X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Fauthor%2Fhttp-server.t;h=7f886ca64dd93ff50d9b5295dda0261702ad0751;hp=ead1cad58d33c893e94ab78679c499f6c32353c2;hb=a526c982f02435e4592256848c679c473ea57b4b;hpb=cc66256716f67b2866a800fd6c99b126f379422d diff --git a/t/author/http-server.t b/t/author/http-server.t index ead1cad..7f886ca 100644 --- a/t/author/http-server.t +++ b/t/author/http-server.t @@ -5,7 +5,7 @@ use Test::More tests => 1; use File::Path; use FindBin; -use Test::TCP; +use Net::EmptyPort qw(wait_port empty_port); use Try::Tiny; use Plack::Builder; @@ -96,10 +96,7 @@ if ($^O eq 'MSWin32') { sub wait_port_timeout { my ($port, $timeout) = @_; - # wait_port waits for 10 seconds - for (1 .. int($timeout / 10)) { # meh, good enough. - try { wait_port $port; 1 } and return; - } + wait_port($port, 0.1, $timeout * 10) and return; die "Server did not start within $timeout seconds"; }