Author: stas
Date: Mon Feb 7 16:17:27 2005
New Revision: 151798
URL: http://svn.apache.org/viewcvs?view=rev&rev=151798
Log:
the order of prints on the server side is not important here,
what's important is that we get all the printed strings
(there were failures before, where a parent would print before the thread)
Modified:
perl/modperl/trunk/ModPerl-Registry/t/cgi-bin/ithreads_io_n_tie.pl
perl/modperl/trunk/ModPerl-Registry/t/ithreads.t
Modified: perl/modperl/trunk/ModPerl-Registry/t/cgi-bin/ithreads_io_n_tie.pl
URL:
http://svn.apache.org/viewcvs/perl/modperl/trunk/ModPerl-Registry/t/cgi-bin/ithreads_io_n_tie.pl?view=diff&r1=151797&r2=151798
==============================================================================
--- perl/modperl/trunk/ModPerl-Registry/t/cgi-bin/ithreads_io_n_tie.pl
(original)
+++ perl/modperl/trunk/ModPerl-Registry/t/cgi-bin/ithreads_io_n_tie.pl Mon Feb
7 16:17:27 2005
@@ -79,6 +79,6 @@
# $thr->join; # XXX: leaks scalar
}
-print "parent";
+print "parent\n";
untie *STDOUT; # don't affect other tests
Modified: perl/modperl/trunk/ModPerl-Registry/t/ithreads.t
URL:
http://svn.apache.org/viewcvs/perl/modperl/trunk/ModPerl-Registry/t/ithreads.t?view=diff&r1=151797&r2=151798
==============================================================================
--- perl/modperl/trunk/ModPerl-Registry/t/ithreads.t (original)
+++ perl/modperl/trunk/ModPerl-Registry/t/ithreads.t Mon Feb 7 16:17:27 2005
@@ -13,8 +13,11 @@
{"perl 5.8.1 or higher w/ithreads enabled is required" => HAS_ITHREADS};
{
- my $expected = join "\n", map("thread $_", 1..4), "parent";
+ # the order of prints on the server side is not important here,
+ # what's important is that we get all the printed strings
+ my @expected = sort map("thread $_", 1..4), "parent";
my $url = "/registry_modperl_handler/ithreads_io_n_tie.pl";
- my $received = GET_BODY_ASSERT($url);
- ok t_cmp $received, $expected;
+ my $received = GET_BODY_ASSERT($url) || '';
+ my @received = sort split /\n/, $received;
+ ok t_cmp [EMAIL PROTECTED], [EMAIL PROTECTED];
}