Skip to content

Commit 689bbc7

Browse files
committed
quic: deflake TestStreamsCreateConcurrency
This test assumed that creating a stream and flushing it on the client ensured the server had accepted the stream. This isn't the case; the stream has been delivered to the server, but there's no guarantee that it been accepted by the user layer. Change the test to make a full loop: The client creates a stream, and then waits for the server to close it. Fixes golang/go#64788 Change-Id: I24f08502e9f5d8bd5a17e680b0aa19dcc2623841 Reviewed-on: https://go-review.googlesource.com/c/net/+/554175 Reviewed-by: Bryan Mills <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent f12db26 commit 689bbc7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/quic/conn_streams_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,10 @@ func TestStreamsCreateConcurrency(t *testing.T) {
510510
return
511511
}
512512
s.Flush()
513+
_, err = io.ReadAll(s)
514+
if err != nil {
515+
t.Errorf("ReadFull: %v", err)
516+
}
513517
s.Close()
514518
}
515519
}()

0 commit comments

Comments
 (0)