diff worker_shutdown_timeout.t @ 1162:feb91ae3fca3

Tests: reduced race in worker_shutdown_timeout test. Made sure that HUP is sent after an old worker process accepted a connection. Previously, a new worker process started early could win in accept() race.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 10 Apr 2017 13:13:49 +0300
parents 4ed2226d47de
children c99c1f43cb15
line wrap: on
line diff
--- a/worker_shutdown_timeout.t
+++ b/worker_shutdown_timeout.t
@@ -56,6 +56,8 @@ EOF
 
 my $s = http('', start => 1);
 
+select undef, undef, undef, 0.2;
+
 kill 'HUP', $t->read_file('nginx.pid');
 
 if (IO::Select->new($s)->can_read(5)) {