From 1318856028d2f771dd9c971e221c469d39601c74 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sat, 11 Sep 2021 14:53:22 +0300 Subject: Fix binary_heap_test max_len Signed-off-by: Valery Piashchynski --- pkg/priority_queue/binary_heap_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/priority_queue/binary_heap_test.go b/pkg/priority_queue/binary_heap_test.go index 41a50101..ab0f9266 100644 --- a/pkg/priority_queue/binary_heap_test.go +++ b/pkg/priority_queue/binary_heap_test.go @@ -67,7 +67,7 @@ func TestBinHeap_MaxLen(t *testing.T) { bh := NewBinHeap(1) go func() { - expected := []Item{Test(1), Test(2), Test(2), Test(2), Test(2), Test(4), Test(6), Test(23), Test(33), Test(44), Test(99)} + expected := []Item{Test(2), Test(23), Test(33), Test(44), Test(1), Test(2), Test(2), Test(2), Test(4), Test(6), Test(99)} res := make([]Item, 0, 12) @@ -79,11 +79,12 @@ func TestBinHeap_MaxLen(t *testing.T) { return }() + time.Sleep(time.Second) for i := 0; i < len(a); i++ { bh.Insert(a[i]) } - time.Sleep(time.Second * 2) + time.Sleep(time.Second) } func TestNewPriorityQueue(t *testing.T) { -- cgit v1.2.3