mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
Improve the code coverage of the gpool, gqueue, gring module (#1987)
This commit is contained in:
@ -62,4 +62,12 @@ func TestQueue_Close(t *testing.T) {
|
||||
t.Assert(q1.Len(), 2)
|
||||
q1.Close()
|
||||
})
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
q1 := gqueue.New(2)
|
||||
q1.Push(1)
|
||||
q1.Push(2)
|
||||
time.Sleep(time.Millisecond)
|
||||
t.Assert(q1.Len(), 2)
|
||||
q1.Close()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user