Mercurial > hg > nginx-tests
diff scgi_cache.t @ 960:d4a0232425ee
Tests: fixed race in SCGI tests.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 24 Jun 2016 16:30:08 +0300 |
parents | e9064d691790 |
children | 882267679006 |
line wrap: on
line diff
--- a/scgi_cache.t +++ b/scgi_cache.t @@ -59,7 +59,7 @@ http { EOF $t->run_daemon(\&scgi_daemon); -$t->run(); +$t->run()->waitforsocket('127.0.0.1:' . port(1)); ############################################################################### @@ -93,7 +93,8 @@ sub scgi_daemon { my %count; while (my $request = $scgi->accept()) { - $request->read_env(); + eval { $request->read_env(); }; + next if $@; my $uri = $request->env->{REQUEST_URI} || ''; my $c = $request->connection();