http3: fix flaky TestClientResponseValidation (#5183)

This commit is contained in:
Marten Seemann
2025-05-31 15:48:45 +08:00
committed by GitHub
parent 06aad3b4ba
commit a39928c556

View 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):