http3: fix flaky TestConnGoAwayFailures (#5252)

This commit is contained in:
Marten Seemann
2025-06-29 02:28:07 +08:00
committed by GitHub
parent dadc8db836
commit 61d2fa57ac

View File

@@ -213,6 +213,8 @@ func testConnControlStreamFailures(t *testing.T, data []byte, readErr error, exp
conn.handleUnidirectionalStreams(nil)
}()
conn.openRequestStream(context.Background(), nil, nil, true, 1000)
switch readErr {
case nil:
_, err = controlStr.Write(data)
@@ -227,8 +229,6 @@ func testConnControlStreamFailures(t *testing.T, data []byte, readErr error, exp
controlStr.CancelWrite(1337)
}
conn.openRequestStream(context.Background(), nil, nil, true, 1000)
select {
case <-serverConn.Context().Done():
require.ErrorIs(t,