Skip to content

Commit

Permalink
Merge pull request #431 from wchristian/win32_harakiri_hang_fix
Browse files Browse the repository at this point in the history
prevent the harakiri test from taking 3 minutes on win32
  • Loading branch information
miyagawa committed Sep 23, 2013
2 parents 6e3c7a7 + 0e37636 commit 4b6481a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t/HTTP-Server-PSGI/harakiri.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use Test::More;
use Test::TCP;
use Test::Requires qw(LWP::UserAgent);

my $ua_timeout = 3;

test_tcp(
server => sub {
my $port = shift;
Expand All @@ -24,11 +26,11 @@ test_tcp(
];
},
);
sleep 5; # to block
sleep $ua_timeout + 2; # to block
},
client => sub {
my $port = shift;
my $ua = LWP::UserAgent->new;
my $ua = LWP::UserAgent->new( timeout => $ua_timeout );
my $res = $ua->get("http://127.0.0.1:$port/");
ok $res->is_success;
is $res->code, 200;
Expand Down

0 comments on commit 4b6481a

Please sign in to comment.