Skip to content

Commit

Permalink
fix: Flaky test ClientSendsAGoAway
Browse files Browse the repository at this point in the history
  • Loading branch information
aranjans committed May 10, 2024
1 parent 59954c8 commit 63ba062
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/goaway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ func (s) TestClientSendsAGoAway(t *testing.T) {
for {
f, err := ct.fr.ReadFrame()
if err != nil {
t.Logf("error reading frame: %v", err)
return
}
switch fr := f.(type) {
Expand All @@ -808,6 +809,7 @@ func (s) TestClientSendsAGoAway(t *testing.T) {
if fr.ErrCode == http2.ErrCodeNo {
t.Logf("GoAway received from client")
close(goAwayReceived)
return
}
default:
t.Errorf("server tester received unexpected frame type %T", f)
Expand All @@ -816,6 +818,7 @@ func (s) TestClientSendsAGoAway(t *testing.T) {
}
}
}()
cc.WaitForStateChange(ctx, connectivity.Connecting)
cc.Close()
defer ct.conn.Close()
select {
Expand Down

0 comments on commit 63ba062

Please sign in to comment.