[Bps-public-commit] r17529 - in HTTP-Server-Simple: . t

jesse at bestpractical.com jesse at bestpractical.com
Fri Jan 2 12:31:04 EST 2009


Author: jesse
Date: Fri Jan  2 12:31:04 2009
New Revision: 17529

Modified:
   HTTP-Server-Simple/   (props changed)
   HTTP-Server-Simple/Changes
   HTTP-Server-Simple/SIGNATURE
   HTTP-Server-Simple/lib/HTTP/Server/Simple.pm
   HTTP-Server-Simple/t/01live.t
   HTTP-Server-Simple/t/04cgi.t

Log:
 r56527 at 174-147-38-243:  jesse | 2009-01-02 12:09:52 -0500
 * Applied patch from gyles19 at visi.com [rt.cpan.org #38011]
  
 [snip]
 > I tried to fix the tests (01live.t, 04cgi.t) to pass on Windows with
 > perl 5.10.0.
 > 
 > The 01live test hangs because the server is not ready for fetching. 
 > Therefore the waiting time is increased to 3 sec. 
 > The SlowServer part of test fails only occasionaly: it uses the same
 > port as the previous one. When the port is different, it's ok, so the 
 > port number is increased by 1.
 > 
 > The 04cgi fixed test uses the same waiting time (3 sec) after starting. 
 > #20 and #21 use http 0.9 and this protocol fails every time so I
 > changed the proto to http 1.0. Don't know why the server doesn't accept 
 > this protocol.
 [snip]
 
 There is mention of this issue on one or more of the other open bug reports.
 I am seeing the same problem on linux/perl 5.8.8.I found that the 
 attached one-line patch fixes the failures in 01live.t, at least running
 on my ancient laptop. 
  
 r56528 at 174-147-38-243:  jesse | 2009-01-02 12:20:24 -0500
 * Patches from radek to fix aspects of [rt.cpan.org #38011] selected and manually applied
 
 From: Radek via RT <bug-HTTP-Server-Simple at rt.cpan.org>
 To: undisclosed-recipients: ;
 Reply-To: bug-HTTP-Server-Simple at rt.cpan.org
 Subject: [rt.cpan.org #38011] Tests hang on Windows XP with Strawberry Perl 5.10.0.1
 RT-Originator: raherh at gmail.com
 
 [-- Attachment #1 --]
 [-- Type: text/plain, Encoding: 8bit, Size: 1.0K --]
 
        Queue: HTTP-Server-Simple
  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=38011 >
 
 On Tue Jul 29 07:05:53 2008, david.sitsky at gmail.com wrote:
 > I am trying to install Catalyst on a Windows XP machine with
 > Strawberry Perl 5.10.0.1.
 >
 > Unfortunately the tests seem to hang in the same spot - here is the
 > relevant output.  Is there anything I can do to get this working?
 
 I tried to fix the tests (01live.t, 04cgi.t) to pass on Windows with
 perl 5.10.0.
 
 The 01live test hangs because the server is not ready for fetching.
 Therefore the waiting time is increased to 3 sec.
 The SlowServer part of test fails only occasionaly: it uses the same
 port as the previous one. When the port is different, it's ok, so the
 port number is increased by 1.
 
 The 04cgi fixed test uses the same waiting time (3 sec) after starting.
 #20 and #21 use http 0.9 and this protocol fails every time so I
 changed the proto to http 1.0. Don't know why the server doesn't accept
 this protocol.
 
 Both patches are included.
 
 Radek
 
 
 r56529 at 174-147-38-243:  jesse | 2009-01-02 12:30:55 -0500
 * 0.37 releng


Modified: HTTP-Server-Simple/Changes
==============================================================================
--- HTTP-Server-Simple/Changes	(original)
+++ HTTP-Server-Simple/Changes	Fri Jan  2 12:31:04 2009
@@ -1,3 +1,7 @@
+0.37 Fri Jan  2 12:21:30 EST 2009
+
+* Several fixes for [rt.cpan.org #38011] designed to help get HSS to pass tests on Strawberry Perl
+
 0.36
 
 * Documentation fixups

Modified: HTTP-Server-Simple/SIGNATURE
==============================================================================
--- HTTP-Server-Simple/SIGNATURE	(original)
+++ HTTP-Server-Simple/SIGNATURE	Fri Jan  2 12:31:04 2009
@@ -14,7 +14,7 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 af311b6f977e690ad39ff86b71e6d3bb611b7d6a Changes
+SHA1 f6bbcd64bf170606bf4d1b74ef1254a41f99d04b Changes
 SHA1 0ac508c50476dcc2bf8fe3094cb341425291e1ee MANIFEST
 SHA1 cf3198cef8524b06b0f6df065b577225caf74a69 META.yml
 SHA1 1e68273869351212220429a4860ce710d5f3e291 Makefile.PL
@@ -28,18 +28,18 @@
 SHA1 7d3be9b158e37b2b2c22084740099955623b1d56 inc/Module/Install/Metadata.pm
 SHA1 0a8b66180229ba2f9deaea1fedd0aacf7a7ace6b inc/Module/Install/Win32.pm
 SHA1 d3352eb33fe43a5f3ead513f645224fe34d73bc9 inc/Module/Install/WriteAll.pm
-SHA1 47c1b14c60d44388818e99b86f58d3a688e6f7a1 lib/HTTP/Server/Simple.pm
+SHA1 f2400c335e46755cccb49286d3be08517d12d2d1 lib/HTTP/Server/Simple.pm
 SHA1 3ddd188b0ee926a7e114e711b88c0af69b9a9079 lib/HTTP/Server/Simple/CGI.pm
 SHA1 56e2d88c9a3ddd3b264d86279a52c099bbffa8f4 lib/HTTP/Server/Simple/CGI/Environment.pm
 SHA1 db064af54cab345a71daec576e32e64b8fb1033d t/00smoke.t
-SHA1 c58cc41a260213d9aeb4bed7b6c2926a37a3402a t/01live.t
+SHA1 a88394bb5ff0fc9e3ba47418d8ec3b7719f5dc87 t/01live.t
 SHA1 aca95653cfce68912e08c57b3a4566207e2f99b3 t/02pod.t
 SHA1 a7024d0d8e7b80d26f75a3551a1406a797b382f8 t/03podcoverage.t
-SHA1 e19b6afffd4ced1f89832080822686f49a155688 t/04cgi.t
+SHA1 955d3f61daf7e703cea842c50441ed5f8200ee51 t/04cgi.t
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.9 (GNU/Linux)
+Version: GnuPG v1.4.9 (Darwin)
 
-iEYEARECAAYFAkko/RgACgkQMflWJZZAbqAOHwCgmAefircgIQo/xfW4s32oRUpV
-f5kAoIJYFbQn+PhGq0Nb0l23P1M5AHBs
-=KgDS
+iEYEARECAAYFAkleTe0ACgkQEi9d9xCOQEajBACgr0HRylDlsSZJ4PZV1sszAYym
+RU8Anion2O4XteW+KvSyvZTTa+ChsBb2
+=MSkY
 -----END PGP SIGNATURE-----

Modified: HTTP-Server-Simple/lib/HTTP/Server/Simple.pm
==============================================================================
--- HTTP-Server-Simple/lib/HTTP/Server/Simple.pm	(original)
+++ HTTP-Server-Simple/lib/HTTP/Server/Simple.pm	Fri Jan  2 12:31:04 2009
@@ -8,7 +8,7 @@
 use URI::Escape;
 
 use vars qw($VERSION $bad_request_doc);
-$VERSION = '0.36';
+$VERSION = '0.37';
 
 =head1 NAME
 

Modified: HTTP-Server-Simple/t/01live.t
==============================================================================
--- HTTP-Server-Simple/t/01live.t	(original)
+++ HTTP-Server-Simple/t/01live.t	Fri Jan  2 12:31:04 2009
@@ -20,24 +20,18 @@
 use base qw(HTTP::Server::Simple::CGI);
 sub setup_listener {
     my $self = shift;
-    sleep 2;
     $self->SUPER::setup_listener();
+    sleep 2;
 }
 1;
 package main;
 
 my $DEBUG = 1 if @ARGV;
 
-my @classes = (qw(HTTP::Server::Simple));
+my @classes = (qw(HTTP::Server::Simple SlowServer));
 for my $class (@classes) {
     run_server_tests($class);
-}
-
-
-TODO: { 
-    local $TODO = "We don't currently wait for 'server is running' responses from the client";
-    run_server_tests('SlowServer');
-
+    $PORT++; # don't reuse the port incase your bogus os doesn't release in time
 }
 
 

Modified: HTTP-Server-Simple/t/04cgi.t
==============================================================================
--- HTTP-Server-Simple/t/04cgi.t	(original)
+++ HTTP-Server-Simple/t/04cgi.t	Fri Jan  2 12:31:04 2009
@@ -32,7 +32,7 @@
 {
   my $server=CGIServer->new($PORT);
   is($server->port(),$PORT,'Constructor set port correctly');
-  select(undef,undef,undef,0.2); # wait a sec
+  sleep(3); # wait just a moment
 
   my $pid=$server->background;
 



More information about the Bps-public-commit mailing list