perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fred Moyer" <f...@taperfriendlymusic.org>
Subject [Fwd: svn commit: r606831 - in /perl/modperl/trunk/t: apr/pool_lifetime.t response/TestAPR/pool_lifetime.pm]
Date Wed, 26 Dec 2007 03:16:48 GMT
Gozer, I've refactored everything to use keep alives instead of sameinterp
per your example and our discussion at ApacheCon.  I haven't tested to see
if it sped up running the test suite, but it should in theory since less
attempts will be made to locate the correct interpreter.

There is still t/modperl/sameinterp.t and
t/response/TestModperl/sameinterp.pm to implement the actual sameinterp
mechanism.  Should I remove those, or is there some part of it we need
that keep_alives doesn't do?

- Fred

---------------------------- Original Message ----------------------------
Subject: svn commit: r606831 - in /perl/modperl/trunk/t:
apr/pool_lifetime.t response/TestAPR/pool_lifetime.pm From:   
phred@apache.org
Date:    Tue, December 25, 2007 6:50 pm
To:      modperl-cvs@perl.apache.org
--------------------------------------------------------------------------

Author: phred
Date: Tue Dec 25 18:50:29 2007
New Revision: 606831

URL: http://svn.apache.org/viewvc?rev=606831&view=rev
Log:
Refactor to use keep_alives instead of TestCommon::SameInterp.
As done originally in revision 594682 at ApacheCon 2007

Modified:
    perl/modperl/trunk/t/apr/pool_lifetime.t
    perl/modperl/trunk/t/response/TestAPR/pool_lifetime.pm

Modified: perl/modperl/trunk/t/apr/pool_lifetime.t
URL:
http://svn.apache.org/viewvc/perl/modperl/trunk/t/apr/pool_lifetime.t?rev=606831&r1=606830&r2=606831&view=diff
==============================================================================
--- perl/modperl/trunk/t/apr/pool_lifetime.t (original)
+++ perl/modperl/trunk/t/apr/pool_lifetime.t Tue Dec 25 18:50:29 2007 @@
-4,7 +4,7 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
-use TestCommon::SameInterp;
+Apache::TestRequest::user_agent(keep_alive => 1);

 plan tests => 2, need 'HTML::HeadParser';

@@ -12,18 +12,14 @@
 my $location = '/' . Apache::TestRequest::module2path($module);

 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 (1..2) {
     my $expected = "Pong";
-    my $received = same_interp_req_body($same_interp, \&GET, $location);
-    $skip++ unless defined $received;
-    same_interp_skip_not_found(
-        $skip,
+    my $received = GET "$location";
+
+    ok t_cmp(
+        $received->content,
         $expected,
-        $received,
-        "Pong"
+        "Pong",
     );
 }

Modified: perl/modperl/trunk/t/response/TestAPR/pool_lifetime.pm
URL:
http://svn.apache.org/viewvc/perl/modperl/trunk/t/response/TestAPR/pool_lifetime.pm?rev=606831&r1=606830&r2=606831&view=diff
==============================================================================
--- perl/modperl/trunk/t/response/TestAPR/pool_lifetime.pm (original) +++
perl/modperl/trunk/t/response/TestAPR/pool_lifetime.pm Tue Dec 25 18:50:29
2007 @@ -23,5 +23,3 @@
 }

 1;
-__END__
-PerlFixupHandler Apache::TestHandler::same_interp_fixup






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message