Mercurial > hg > nginx-tests
changeset 273:36c75df75ca4
Tests: fix startup race in fastcgi_keepalive.t, proxy_keepalive.t.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 21 Mar 2013 21:02:15 +0400 |
parents | 957fe2a76aa7 |
children | ccebd3168b5b |
files | fastcgi_keepalive.t proxy_keepalive.t |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }
--- 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: