diff proxy.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 c1269426585d
line wrap: on
line diff
--- a/proxy.t
+++ b/proxy.t
@@ -49,7 +49,7 @@ http {
 EOF
 
 $t->run_daemon(\&http_daemon);
-$t->run();
+$t->run()->waitforsocket('127.0.0.1:8081');
 
 ###############################################################################
 
@@ -69,6 +69,8 @@ sub http_daemon {
 	)
 		or die "Can't create listening socket: $!\n";
 
+	local $SIG{PIPE} = 'IGNORE';
+
 	while (my $client = $server->accept()) {
 		$client->autoflush(1);