diff --git a/sapi/fpm/tests/proc-idle-timeout.phpt b/sapi/fpm/tests/proc-idle-timeout.phpt index a6d3395c14a84..9f6d4377b8ce4 100644 --- a/sapi/fpm/tests/proc-idle-timeout.phpt +++ b/sapi/fpm/tests/proc-idle-timeout.phpt @@ -4,7 +4,6 @@ FPM: Process manager config pm.process_idle_timeout --FILE-- start(); $tester->expectLogStartNotices(); -$tester->multiRequest(2); +$tester->multiRequest(2, null, null, null, false, 7000); $tester->status([ 'total processes' => 2, ]); // wait for process idle timeout -sleep(6); +sleep(5); $tester->status([ 'total processes' => 1, ]); diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc index 7868afc4ac1ba..5a190f0d39cbc 100644 --- a/sapi/fpm/tests/tester.inc +++ b/sapi/fpm/tests/tester.inc @@ -624,6 +624,7 @@ class Tester * @param string|null $successMessage * @param string|null $errorMessage * @param bool $connKeepAlive + * @param int $readTimeout * @return Response[] * @throws \Exception */ @@ -632,7 +633,8 @@ class Tester string $address = null, string $successMessage = null, string $errorMessage = null, - bool $connKeepAlive = false + bool $connKeepAlive = false, + int $readTimeout = 0 ) { if ($this->hasError()) { return new Response(null, true); @@ -658,8 +660,8 @@ class Tester ]; }, $requests); - $responses = array_map(function ($conn) { - $response = new Response($conn['client']->wait_for_response_data($conn['requestId'])); + $responses = array_map(function ($conn) use ($readTimeout) { + $response = new Response($conn['client']->wait_for_response_data($conn['requestId'], $readTimeout)); if ($this->debug) { $response->debugOutput(); }