changeset 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 e1225e304e46
children bd1cf0a80b28
files worker_shutdown_timeout.t
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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)) {