From a39928c5564a069aa49b97182ba1bcb447f3d2e4 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 31 May 2025 15:48:45 +0800 Subject: [PATCH] http3: fix flaky TestClientResponseValidation (#5183) --- http3/client_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http3/client_test.go b/http3/client_test.go index d65c4f533..8689e972e 100644 --- a/http3/client_test.go +++ b/http3/client_test.go @@ -198,6 +198,9 @@ func testClientResponseValidation(t *testing.T, tr *Transport, rsp []byte, expec select { case err := <-errChan: expectStreamWriteReset(t, str, expectedReset) + // The client closes the stream after sending the request, + // so we need to wait for the RESET_STREAM frame to be received. + time.Sleep(scaleDuration(10 * time.Millisecond)) expectStreamReadReset(t, str, expectedReset) return err case <-time.After(time.Second):