diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-01-21 17:55:47 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-01-21 17:55:47 +0100 |
commit | 0aa09da486da5f5236f3b5b30429e73b0d377454 (patch) | |
tree | ed977b36fa0f44eda803a1f2761ec28217747f2a /sapi/fpm/tests | |
parent | 16a8a608d5c1ae12320d361d0a828bbccd52680d (diff) | |
download | php-git-0aa09da486da5f5236f3b5b30429e73b0d377454.tar.gz |
Add sleep in FPM reload test
Explicitly mark the point where we have to wait.
Diffstat (limited to 'sapi/fpm/tests')
-rw-r--r-- | sapi/fpm/tests/reload-uses-sigkill-as-last-measure.phpt | 4 | ||||
-rw-r--r-- | sapi/fpm/tests/tester.inc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sapi/fpm/tests/reload-uses-sigkill-as-last-measure.phpt b/sapi/fpm/tests/reload-uses-sigkill-as-last-measure.phpt index 25c2cf25e2..4e2da76d56 100644 --- a/sapi/fpm/tests/reload-uses-sigkill-as-last-measure.phpt +++ b/sapi/fpm/tests/reload-uses-sigkill-as-last-measure.phpt @@ -4,6 +4,7 @@ If SIGQUIT and SIGTERM during reloading fail, SIGKILL should be sent <?php include "skipif.inc"; if (!function_exists('pcntl_sigprocmask')) die('skip Requires pcntl_sigprocmask()'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php @@ -38,6 +39,9 @@ $tester->request()->expectEmptyBody(); $tester->signal('USR2'); $tester->expectLogNotice('Reloading in progress ...'); $tester->expectLogNotice('reloading: .*'); +// The timeout needs to elapse twice until the process will be killed, +// so we have to wait at least two seconds. +sleep(2); $tester->expectLogNotice('using inherited socket fd=\d+, "127.0.0.1:\d+"'); $tester->expectLogStartNotices(); $tester->ping('{{ADDR}}'); diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index 3c452a19d5..3424898074 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -622,7 +622,7 @@ class Tester $read = [$this->outDesc]; $write = null; $except = null; - if (stream_select($read, $write, $except, $timeout=5)) { + if (stream_select($read, $write, $except, $timeout=3)) { return fgets($this->outDesc); } else { return null; |