A server that accepts the connection and sends one byte per second passes every check except a total timeout, and a client with only a connect timeout waits forever.
// the test, which is slow and belongs in its own group
/** @group slow */
public function testSlowResponseHitsTheTotalTimeout(): void
{
Http::fake(['rates.example/*' => function () {
usleep(6_000_000);
return Http::response(['rates' => []], 200);
}]);
$this->assertTrue($this->shipping->quote($b)->isFallback());
}
This is the failure that exhausts a worker pool rather than failing one request, which makes it worth the six seconds of test time. Setting both a connect timeout and a total timeout explicitly is the fix, and the default for one of them is usually infinite — which is not obvious from any client library’s documentation.