comparison proxy_cache_chunked.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 1c356f231c8f
children 071e8941e3bf
comparison
equal deleted inserted replaced
294:71e275487aeb 295:6fe0459b6668
57 } 57 }
58 58
59 EOF 59 EOF
60 60
61 $t->run_daemon(\&http_chunked_daemon); 61 $t->run_daemon(\&http_chunked_daemon);
62 $t->run(); 62 $t->run()->waitforsocket('127.0.0.1:8081');
63 63
64 ############################################################################### 64 ###############################################################################
65 65
66 like(http_get("/"), qr/SEE-THIS/s, "chunked"); 66 like(http_get("/"), qr/SEE-THIS/s, "chunked");
67 like(http_get("/"), qr/SEE-THIS.*HIT/s, "chunked cached"); 67 like(http_get("/"), qr/SEE-THIS.*HIT/s, "chunked cached");
74 LocalAddr => '127.0.0.1:8081', 74 LocalAddr => '127.0.0.1:8081',
75 Listen => 5, 75 Listen => 5,
76 Reuse => 1 76 Reuse => 1
77 ) 77 )
78 or die "Can't create listening socket: $!\n"; 78 or die "Can't create listening socket: $!\n";
79
80 local $SIG{PIPE} = 'IGNORE';
79 81
80 while (my $client = $server->accept()) { 82 while (my $client = $server->accept()) {
81 $client->autoflush(1); 83 $client->autoflush(1);
82 84
83 while (<$client>) { 85 while (<$client>) {