]> git.feebdaed.xyz Git - 0xmirror/quic-go.git/commitdiff
http3: fix flaky TestClientResponseValidation (#5183)
authorMarten Seemann <martenseemann@gmail.com>
Sat, 31 May 2025 07:48:45 +0000 (15:48 +0800)
committerGitHub <noreply@github.com>
Sat, 31 May 2025 07:48:45 +0000 (09:48 +0200)
http3/client_test.go

index d65c4f533294e9b5dbd0ff0eacd192e6c1e0a3eb..8689e972e110376215eef78523ece23dc53bb7d2 100644 (file)
@@ -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):