Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (16 sloc) 413 Bytes
use Test::TCP;
use LWP::UserAgent;
use FindBin;
use Test::More;
my $s = Test::TCP->new(
code => sub {
my $port = shift;
exec "$^X bin/starman --port $port --max-requests=1 --workers=1 $FindBin::Bin/findbin.psgi";
},
);
my $ua = LWP::UserAgent->new(timeout => 3);
for (1..2) {
my $res = $ua->get("http://localhost:" . $s->port);
is $res->content, $FindBin::Bin;
}
done_testing;
Jump to Line
Something went wrong with that request. Please try again.