You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by to...@apache.org on 2011/02/02 12:20:04 UTC

svn commit: r1066417 - in /perl/Apache-SizeLimit/trunk/t/response: TestApache/basic.pm TestApache2/basic.pm

Author: torsten
Date: Wed Feb  2 11:20:04 2011
New Revision: 1066417

URL: http://svn.apache.org/viewvc?rev=1066417&view=rev
Log:
t/apache*/basic.t depends on the test order

Subtest 1 checks that Apache2::SizeLimit->_limits_are_exceeded() returns
false without any limits. But if the test runs near the end of the test
suite it may very well be that some other test has set a limit.

Modified:
    perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm
    perl/Apache-SizeLimit/trunk/t/response/TestApache2/basic.pm

Modified: perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm
URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm?rev=1066417&r1=1066416&r2=1066417&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm (original)
+++ perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm Wed Feb  2 11:20:04 2011
@@ -17,8 +17,13 @@ sub handler {
 
     plan $r, tests => 13;
 
-    ok( ! Apache::SizeLimit->_limits_are_exceeded(),
-        'check that _limits_are_exceeded() returns false without any limits set' );
+    {
+        local ($Apache::SizeLimit::Core::MAX_PROCESS_SIZE,
+               $Apache::SizeLimit::Core::MIN_SHARE_SIZE,
+               $Apache::SizeLimit::Core::MAX_UNSHARED_SIZE);
+        ok( ! Apache::SizeLimit->_limits_are_exceeded(),
+            'check that _limits_are_exceeded() returns false without any limits set' );
+    }
 
     {
         my ( $size, $shared ) = Apache::SizeLimit->_check_size();

Modified: perl/Apache-SizeLimit/trunk/t/response/TestApache2/basic.pm
URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/t/response/TestApache2/basic.pm?rev=1066417&r1=1066416&r2=1066417&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/t/response/TestApache2/basic.pm (original)
+++ perl/Apache-SizeLimit/trunk/t/response/TestApache2/basic.pm Wed Feb  2 11:20:04 2011
@@ -17,8 +17,13 @@ sub handler {
 
     plan $r, tests => 10;
 
-    ok( ! Apache2::SizeLimit->_limits_are_exceeded(),
-        'check that _limits_are_exceeded() returns false without any limits set' );
+    {
+        local ($Apache::SizeLimit::Core::MAX_PROCESS_SIZE,
+               $Apache::SizeLimit::Core::MIN_SHARE_SIZE,
+               $Apache::SizeLimit::Core::MAX_UNSHARED_SIZE);
+        ok( ! Apache2::SizeLimit->_limits_are_exceeded(),
+            'check that _limits_are_exceeded() returns false without any limits set' );
+    }
 
     {
         my ( $size, $shared ) = Apache2::SizeLimit->_check_size();