Skip to content

Commit

Permalink
quic: deflake TestStreamsCreateConcurrency
Browse files Browse the repository at this point in the history
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 <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
neild committed Jan 4, 2024
1 parent f12db26 commit 689bbc7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/quic/conn_streams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,10 @@ func TestStreamsCreateConcurrency(t *testing.T) {
return
}
s.Flush()
_, err = io.ReadAll(s)
if err != nil {
t.Errorf("ReadFull: %v", err)
}
s.Close()
}
}()
Expand Down

0 comments on commit 689bbc7

Please sign in to comment.