延时队列增加数量获取功能
This commit is contained in:
parent
899c206c03
commit
0dd96a1858
@ -35,4 +35,8 @@ func TestQueues(t *testing.T) {
|
|||||||
go q.ContinuousDequeueNotify(route, notify)
|
go q.ContinuousDequeueNotify(route, notify)
|
||||||
time.Sleep(time.Second * 5)
|
time.Sleep(time.Second * 5)
|
||||||
close(notify)
|
close(notify)
|
||||||
|
|
||||||
|
if q.DelayCount(route) != 0 {
|
||||||
|
t.Errorf("queue length error, want %d, got %d", 0, q.DelayCount(route))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user