From 0dd96a1858d35ada9ae16948c8030d32b7e84a62 Mon Sep 17 00:00:00 2001 From: fantasticbin Date: Tue, 10 Dec 2024 18:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E6=97=B6=E9=98=9F=E5=88=97=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=95=B0=E9=87=8F=E8=8E=B7=E5=8F=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lock_free/queues_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lock_free/queues_test.go b/lock_free/queues_test.go index 36c7795..e73ecaa 100644 --- a/lock_free/queues_test.go +++ b/lock_free/queues_test.go @@ -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)) + } }