@@ -35,15 +35,15 @@ func TestBoundedQueue(t *testing.T) {
35
35
return nil
36
36
}))
37
37
assert .Equal (t , 1 , numConsumed )
38
- assert .Equal (t , 0 , q .Size ())
38
+ assert .Equal (t , int64 ( 0 ) , q .Size ())
39
39
40
40
// produce two more items. The first one should be accepted, but not consumed.
41
41
require .NoError (t , q .Offer (context .Background (), "b" ))
42
- assert .Equal (t , 1 , q .Size ())
42
+ assert .Equal (t , int64 ( 1 ) , q .Size ())
43
43
44
44
// the second should be rejected since the queue is full
45
45
require .ErrorIs (t , q .Offer (context .Background (), "c" ), ErrQueueIsFull )
46
- assert .Equal (t , 1 , q .Size ())
46
+ assert .Equal (t , int64 ( 1 ) , q .Size ())
47
47
48
48
assert .True (t , consume (q , func (_ context.Context , item string ) error {
49
49
assert .Equal (t , "b" , item )
@@ -82,7 +82,7 @@ func TestShutdownWhileNotEmpty(t *testing.T) {
82
82
}
83
83
assert .NoError (t , q .Shutdown (context .Background ()))
84
84
85
- assert .Equal (t , 10 , q .Size ())
85
+ assert .Equal (t , int64 ( 10 ) , q .Size ())
86
86
numConsumed := 0
87
87
for i := 0 ; i < 10 ; i ++ {
88
88
assert .True (t , consume (q , func (_ context.Context , item string ) error {
@@ -92,7 +92,7 @@ func TestShutdownWhileNotEmpty(t *testing.T) {
92
92
}))
93
93
}
94
94
assert .Equal (t , 10 , numConsumed )
95
- assert .Equal (t , 0 , q .Size ())
95
+ assert .Equal (t , int64 ( 0 ) , q .Size ())
96
96
97
97
assert .False (t , consume (q , func (_ context.Context , item string ) error {
98
98
panic (item )
0 commit comments