Skip to content

Commit d2c99b2

Browse files
committed
refactor
1 parent eb41d78 commit d2c99b2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pkg/inspector/inspector_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,9 @@ func TestInspector_Send_SessionCtxCanceled(t *testing.T) {
9393
assertGotRecord(is.New(t), s, r)
9494

9595
cancel()
96-
time.Sleep(100 * time.Millisecond)
9796

98-
select {
99-
case _, ok := <-s.C:
100-
is.True(!ok) // expected no record
101-
default:
102-
is.Fail() // expected channel to be closed
103-
}
97+
_, got, _ := cchan.Chan[record.Record](s.C).RecvTimeout(context.Background(), 100*time.Millisecond)
98+
is.True(!got) // expected no record
10499
}
105100

106101
func TestInspector_Send_SlowConsumer(t *testing.T) {

0 commit comments

Comments
 (0)