# HG changeset patch # User Sergey Kandaurov # Date 1490876769 -10800 # Node ID 06bb6af4324eec826bb45fabe529962fbafb41a8 # Parent d12c45f14102bad5bd46573d176e847abeaf7bab Tests: adjusted worker_shutdown_timeout test. Use select on socket to speed up test, adjust read timeout for slow hosts. diff --git a/worker_shutdown_timeout.t b/worker_shutdown_timeout.t --- a/worker_shutdown_timeout.t +++ b/worker_shutdown_timeout.t @@ -12,6 +12,8 @@ use strict; use Test::More; +use IO::Select; + BEGIN { use FindBin; chdir($FindBin::Bin); } use lib 'lib'; @@ -55,7 +57,7 @@ EOF my $s = http('', start => 1); kill 'HUP', $t->read_file('nginx.pid'); -sleep 1; +IO::Select->new($s)->can_read(2); is(http_get('/', socket => $s) || '', '', 'worker_shutdown_timeout');