Mercurial > hg > nginx-tests
diff proxy_cache.t @ 295:6fe0459b6668
Tests: eliminate startup races in proxy and fastcgi tests.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 08 Jun 2013 07:02:11 +0400 |
parents | 6a0d934950bc |
children | 44c42894fdfd |
line wrap: on
line diff
--- a/proxy_cache.t +++ b/proxy_cache.t @@ -80,8 +80,9 @@ EOF $t->write_file('t.html', 'SEE-THIS'); $t->write_file('t2.html', 'SEE-THIS'); $t->write_file('empty.html', ''); + $t->run_daemon(\&http_fake_daemon); -$t->run(); +$t->run()->waitforsocket('127.0.0.1:8081'); ############################################################################### @@ -139,6 +140,8 @@ sub http_fake_daemon { ) or die "Can't create listening socket: $!\n"; + local $SIG{PIPE} = 'IGNORE'; + my $num = 0; while (my $client = $server->accept()) {