We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4d9543a + fcc459d commit b955e5fCopy full SHA for b955e5f
Tests/HttpClientTestCase.php
@@ -97,7 +97,7 @@ public function testTimeoutIsNotAFatalError()
97
{
98
$client = $this->getHttpClient(__FUNCTION__);
99
$response = $client->request('GET', 'http://localhost:8057/timeout-body', [
100
- 'timeout' => 0.1,
+ 'timeout' => 0.3,
101
]);
102
103
try {
@@ -106,7 +106,16 @@ public function testTimeoutIsNotAFatalError()
106
} catch (TransportException $e) {
107
}
108
109
- usleep(400000);
110
- $this->assertSame('<1><2>', $response->getContent());
+ for ($i = 0; $i < 10; ++$i) {
+ try {
111
+ $this->assertSame('<1><2>', $response->getContent());
112
+ break;
113
+ } catch (TransportException $e) {
114
+ }
115
116
+
117
+ if (10 === $i) {
118
+ throw $e;
119
120
121
0 commit comments