Skip to content

Commit 3753ade

Browse files
committed
fix: Flaky test ClientSendsAGoAway
1 parent 59954c8 commit 3753ade

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/goaway_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@ func (s) TestClientSendsAGoAway(t *testing.T) {
800800
for {
801801
f, err := ct.fr.ReadFrame()
802802
if err != nil {
803+
t.Fatalf("error reading frame: %v", err)
803804
return
804805
}
805806
switch fr := f.(type) {
@@ -808,6 +809,7 @@ func (s) TestClientSendsAGoAway(t *testing.T) {
808809
if fr.ErrCode == http2.ErrCodeNo {
809810
t.Logf("GoAway received from client")
810811
close(goAwayReceived)
812+
return
811813
}
812814
default:
813815
t.Errorf("server tester received unexpected frame type %T", f)
@@ -816,6 +818,7 @@ func (s) TestClientSendsAGoAway(t *testing.T) {
816818
}
817819
}
818820
}()
821+
cc.WaitForStateChange(ctx, connectivity.Connecting)
819822
cc.Close()
820823
defer ct.conn.Close()
821824
select {

0 commit comments

Comments
 (0)