Skip to content

Commit 2f8407f

Browse files
committed
Increase read timeout in FPM process idle test
1 parent fc67967 commit 2f8407f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sapi/fpm/tests/proc-idle-timeout.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ EOT;
2929
$tester = new FPM\Tester($cfg, $code);
3030
$tester->start();
3131
$tester->expectLogStartNotices();
32-
$tester->multiRequest(2);
32+
$tester->multiRequest(2, null, null, null, false, 7000);
3333
$tester->status([
3434
'total processes' => 2,
3535
]);

sapi/fpm/tests/tester.inc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ class Tester
624624
* @param string|null $successMessage
625625
* @param string|null $errorMessage
626626
* @param bool $connKeepAlive
627+
* @param int $readTimeout
627628
* @return Response[]
628629
* @throws \Exception
629630
*/
@@ -632,7 +633,8 @@ class Tester
632633
string $address = null,
633634
string $successMessage = null,
634635
string $errorMessage = null,
635-
bool $connKeepAlive = false
636+
bool $connKeepAlive = false,
637+
int $readTimeout = 0
636638
) {
637639
if ($this->hasError()) {
638640
return new Response(null, true);
@@ -658,8 +660,8 @@ class Tester
658660
];
659661
}, $requests);
660662

661-
$responses = array_map(function ($conn) {
662-
$response = new Response($conn['client']->wait_for_response_data($conn['requestId']));
663+
$responses = array_map(function ($conn) use ($readTimeout) {
664+
$response = new Response($conn['client']->wait_for_response_data($conn['requestId'], $readTimeout));
663665
if ($this->debug) {
664666
$response->debugOutput();
665667
}

0 commit comments

Comments
 (0)