# HG changeset patch # User Maxim Dounin # Date 1363885335 -14400 # Node ID 36c75df75ca43f4e6a546de0a758e1fc37b8ed6d # Parent 957fe2a76aa7c32ea4da0caac889f213aa603574 Tests: fix startup race in fastcgi_keepalive.t, proxy_keepalive.t. diff --git a/fastcgi_keepalive.t b/fastcgi_keepalive.t --- a/fastcgi_keepalive.t +++ b/fastcgi_keepalive.t @@ -54,6 +54,9 @@ EOF $t->run_daemon(\&fastcgi_test_daemon); $t->run(); +$t->waitforsocket('127.0.0.1:8081') + or die "Can't start test backend"; + ############################################################################### like(http_get('/'), qr/SEE-THIS/, 'fastcgi request'); @@ -185,6 +188,8 @@ connection: $ccount EOF } + $ccount-- unless $rcount; + close $client; } } diff --git a/proxy_keepalive.t b/proxy_keepalive.t --- a/proxy_keepalive.t +++ b/proxy_keepalive.t @@ -75,6 +75,9 @@ EOF $t->run_daemon(\&http_daemon); $t->run(); +$t->waitforsocket('127.0.0.1:8081') + or die "Can't start test backend"; + ############################################################################### # There are 3 mostly independend modes of upstream operation: