This test tends to fail sometimes, likely due to plackup
startup being slow on a cold page cache and having an
overloaded rotational HDD.
# wait for plackup socket()+bind()+listen()
my %opt = ( Proto => 'tcp', Type => Socket::SOCK_STREAM(),
PeerAddr => "$host:$port" );
# wait for plackup socket()+bind()+listen()
my %opt = ( Proto => 'tcp', Type => Socket::SOCK_STREAM(),
PeerAddr => "$host:$port" );
tick();
last if IO::Socket::INET->new(%opt);
}
tick();
last if IO::Socket::INET->new(%opt);
}
+ IO::Socket::INET->new(%opt) or xbail "connect $host:$port: $!";
my $dst = "$tmpdir/scrape";
@cmd = (qw(-clone -q), "http://$host:$port/v2", $dst);
run_script(\@cmd, undef, { 2 => \($err = '') });
my $dst = "$tmpdir/scrape";
@cmd = (qw(-clone -q), "http://$host:$port/v2", $dst);
run_script(\@cmd, undef, { 2 => \($err = '') });