diff --git a/test/Connection/Http2ConnectionTest.php b/test/Connection/Http2ConnectionTest.php index 6b469b8d..88e0f60d 100644 --- a/test/Connection/Http2ConnectionTest.php +++ b/test/Connection/Http2ConnectionTest.php @@ -571,9 +571,10 @@ public function testServerGoAwayFrame(): void $this->server->close(); }); - $response1 = $stream1->request($request1, new NullCancellation); + $response1Future = async(fn () => $stream1->request($request1, new NullCancellation)); $response2Future = async(fn () => $stream2->request($request2, new NullCancellation)); + $response1 = $response1Future->await(); self::assertSame(200, $response1->getStatus()); self::assertSame('test', $response1->getBody()->buffer());