延时队列增加数量获取功能

This commit is contained in:
fantasticbin 2024-12-10 18:32:38 +08:00
parent 899c206c03
commit 0dd96a1858

View File

@ -35,4 +35,8 @@ func TestQueues(t *testing.T) {
go q.ContinuousDequeueNotify(route, notify)
time.Sleep(time.Second * 5)
close(notify)
if q.DelayCount(route) != 0 {
t.Errorf("queue length error, want %d, got %d", 0, q.DelayCount(route))
}
}