Skip to content

Commit c5b0a00

Browse files
committed
Fix badPing test duration
1 parent 3673c2c commit c5b0a00

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: conn_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ func TestConn(t *testing.T) {
9595

9696
c2.CloseRead(tt.ctx)
9797

98-
err := c1.Ping(tt.ctx)
98+
ctx, cancel := context.WithTimeout(tt.ctx, time.Millisecond*100)
99+
defer cancel()
100+
101+
err := c1.Ping(ctx)
99102
assert.Contains(t, err, "failed to wait for pong")
100103
})
101104

0 commit comments

Comments
 (0)