Skip to content

Commit

Permalink
Merge pull request #230 from capnproto/enhancement/mpsc-test-lintfix
Browse files Browse the repository at this point in the history
Fix linter warning due to discarded CancelFunc in mpsc_test
  • Loading branch information
zenhack authored Apr 28, 2022
2 parents 4f0a052 + aa5c359 commit bd319b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/mpsc/mpsc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ func TestRecvEmpty(t *testing.T) {
q := New[int]()

// Recv() on an empty queue should block until the context is canceled.
ctx, _ := context.WithTimeout(context.Background(), time.Millisecond*10)
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*10)
defer cancel()

v, err := q.Recv(ctx)
assert.Equal(t, ctx.Err(), err, "Returned error is not ctx.Err()")
Expand Down

0 comments on commit bd319b7

Please sign in to comment.