Skip to content

Commit 0aa09da

Browse files
committed
Add sleep in FPM reload test
Explicitly mark the point where we have to wait.
1 parent 16a8a60 commit 0aa09da

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sapi/fpm/tests/reload-uses-sigkill-as-last-measure.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ If SIGQUIT and SIGTERM during reloading fail, SIGKILL should be sent
44
<?php
55
include "skipif.inc";
66
if (!function_exists('pcntl_sigprocmask')) die('skip Requires pcntl_sigprocmask()');
7+
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
78
?>
89
--FILE--
910
<?php
@@ -38,6 +39,9 @@ $tester->request()->expectEmptyBody();
3839
$tester->signal('USR2');
3940
$tester->expectLogNotice('Reloading in progress ...');
4041
$tester->expectLogNotice('reloading: .*');
42+
// The timeout needs to elapse twice until the process will be killed,
43+
// so we have to wait at least two seconds.
44+
sleep(2);
4145
$tester->expectLogNotice('using inherited socket fd=\d+, "127.0.0.1:\d+"');
4246
$tester->expectLogStartNotices();
4347
$tester->ping('{{ADDR}}');

sapi/fpm/tests/tester.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ class Tester
622622
$read = [$this->outDesc];
623623
$write = null;
624624
$except = null;
625-
if (stream_select($read, $write, $except, $timeout=5)) {
625+
if (stream_select($read, $write, $except, $timeout=3)) {
626626
return fgets($this->outDesc);
627627
} else {
628628
return null;

0 commit comments

Comments
 (0)