]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/v2mirror: increase timeout for plackup bind+listen
authorEric Wong <e@80x24.org>
Thu, 8 Sep 2022 08:16:45 +0000 (08:16 +0000)
committerEric Wong <e@80x24.org>
Thu, 8 Sep 2022 08:17:05 +0000 (08:17 +0000)
This test tends to fail sometimes, likely due to plackup
startup being slow on a cold page cache and having an
overloaded rotational HDD.

t/v2mirror.t

index 37d64e83e53bff264bbc04a5eb4d5f22889b5d1c..f9074e45e6634e34aa9485079de0cced946e15f6 100644 (file)
@@ -368,10 +368,11 @@ EOM
        # wait for plackup socket()+bind()+listen()
        my %opt = ( Proto => 'tcp', Type => Socket::SOCK_STREAM(),
                PeerAddr => "$host:$port" );
-       for (0..50) {
+       for (0..100) {
                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 = '') });