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 ph...@apache.org on 2007/12/26 04:08:20 UTC

svn commit: r606835 - in /perl/modperl/trunk: Changes t/hooks/TestHooks/inlined_handlers.pm t/hooks/inlined_handlers.t t/modperl/cookie2.t t/response/TestModperl/cookie2.pm

Author: phred
Date: Tue Dec 25 19:08:19 2007
New Revision: 606835

URL: http://svn.apache.org/viewvc?rev=606835&view=rev
Log:
Refactor additional tests to use keepalives instead of same_interp.
See revision 594682 for additional details.

Modified:
    perl/modperl/trunk/Changes
    perl/modperl/trunk/t/hooks/TestHooks/inlined_handlers.pm
    perl/modperl/trunk/t/hooks/inlined_handlers.t
    perl/modperl/trunk/t/modperl/cookie2.t
    perl/modperl/trunk/t/response/TestModperl/cookie2.pm

Modified: perl/modperl/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?rev=606835&r1=606834&r2=606835&view=diff
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Tue Dec 25 19:08:19 2007
@@ -12,6 +12,8 @@
 
 =item 2.0.4-dev
 
+Refactor tests to use keepalives instead of same_interp [Gozer, Phred]
+
 Apache2::Reload has been moved to an externally maintained
 CPAN distribution [Fred Moyer <fr...@redhotpenguin.com>]
 

Modified: perl/modperl/trunk/t/hooks/TestHooks/inlined_handlers.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/hooks/TestHooks/inlined_handlers.pm?rev=606835&r1=606834&r2=606835&view=diff
==============================================================================
--- perl/modperl/trunk/t/hooks/TestHooks/inlined_handlers.pm (original)
+++ perl/modperl/trunk/t/hooks/TestHooks/inlined_handlers.pm Tue Dec 25 19:08:19 2007
@@ -5,10 +5,6 @@
 # previously there was a bug in non-ithreaded-perl implementation
 # where the cached compiled CODE ref didn't have the reference count
 # right.
-#
-# this test needs to run via the same_interpr framework, since it must
-# test that the same perl interprter/process gets to run the same
-# inlined handler
 
 use strict;
 use warnings FATAL => 'all';
@@ -30,7 +26,6 @@
 <NoAutoConfig>
   <Location /TestHooks__inlined_handlers>
       SetHandler modperl
-      PerlInitHandler     Apache::TestHandler::same_interp_fixup
       PerlFixupHandler    'sub { use Apache2::Const qw(DECLINED); DECLINED }'
       PerlResponseHandler TestHooks::inlined_handlers
   </Location>

Modified: perl/modperl/trunk/t/hooks/inlined_handlers.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/hooks/inlined_handlers.t?rev=606835&r1=606834&r2=606835&view=diff
==============================================================================
--- perl/modperl/trunk/t/hooks/inlined_handlers.t (original)
+++ perl/modperl/trunk/t/hooks/inlined_handlers.t Tue Dec 25 19:08:19 2007
@@ -10,19 +10,14 @@
 
 my $location = "/TestHooks__inlined_handlers";
 
-t_debug "getting the same interp ID for $location";
-my $same_interp = Apache::TestRequest::same_interp_tie($location);
-
-my $skip = $same_interp ? 0 : 1;
 my $expected = "ok";
 for (1..2) {
-    my $received = same_interp_req_body($same_interp, \&GET, $location);
-    $skip++ unless defined $received;
-    same_interp_skip_not_found(
-        $skip,
-        $received,
+    my $received = GET $location;
+
+    ok t_cmp(
+        $received->content,
         $expected,
-        "anonymous handlers in httpd.conf test"
+        "anonymous handlers in httpd.conf test",
     );
 }
 

Modified: perl/modperl/trunk/t/modperl/cookie2.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/modperl/cookie2.t?rev=606835&r1=606834&r2=606835&view=diff
==============================================================================
--- perl/modperl/trunk/t/modperl/cookie2.t (original)
+++ perl/modperl/trunk/t/modperl/cookie2.t Tue Dec 25 19:08:19 2007
@@ -14,7 +14,7 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
-use TestCommon::SameInterp;
+Apache::TestRequest::user_agent(keep_alive => 1);
 
 plan tests => 3, need 'HTML::HeadParser';
 
@@ -30,21 +30,14 @@
 
 my @tests_ordered = qw(header subprocess_env env);
 
-t_debug "getting the same interp ID for $location";
-my $same_interp = Apache::TestRequest::same_interp_tie($location);
-
-my $skip = $same_interp ? 0 : 1;
 for my $test (@tests_ordered) {
     my $cookie = "key=$test";
 
-    my $received = same_interp_req_body($same_interp, \&GET,
-                                        "$location?$test",
-                                        Cookie => $cookie);
-    $skip++ unless defined $received;
-    same_interp_skip_not_found(
-        $skip,
-        $received,
+    my $received = GET "$location?$test", Cookie => $cookie;
+
+    ok t_cmp(
+        $received->content,
         $expected{$test},
-        "perl-script+SetupEnv/cookie: $test"
+        "perl-script+SetupEnv/cookie: $test",
     );
 }

Modified: perl/modperl/trunk/t/response/TestModperl/cookie2.pm
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/response/TestModperl/cookie2.pm?rev=606835&r1=606834&r2=606835&view=diff
==============================================================================
--- perl/modperl/trunk/t/response/TestModperl/cookie2.pm (original)
+++ perl/modperl/trunk/t/response/TestModperl/cookie2.pm Tue Dec 25 19:08:19 2007
@@ -44,6 +44,5 @@
 __DATA__
 SetHandler modperl
 PerlModule          TestModperl::cookie2
-PerlInitHandler     Apache::TestHandler::same_interp_fixup
 PerlAccessHandler   TestModperl::cookie2::access
 PerlResponseHandler TestModperl::cookie2