Skip to content

Commit

Permalink
Fix badPing test duration
Browse files Browse the repository at this point in the history
  • Loading branch information
nhooyr committed Feb 13, 2020
1 parent 3673c2c commit c5b0a00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ func TestConn(t *testing.T) {

c2.CloseRead(tt.ctx)

err := c1.Ping(tt.ctx)
ctx, cancel := context.WithTimeout(tt.ctx, time.Millisecond*100)
defer cancel()

err := c1.Ping(ctx)
assert.Contains(t, err, "failed to wait for pong")
})

Expand Down

0 comments on commit c5b0a00

Please sign in to comment.