diff options
author | Valery Piashchynski <[email protected]> | 2021-09-11 14:53:22 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-09-11 14:53:22 +0300 |
commit | 1318856028d2f771dd9c971e221c469d39601c74 (patch) | |
tree | 65fd3257202b6f3a63b23cbf8b0f72b6bef9cf36 | |
parent | 45799c42aba47b8eeb5df1afc90bcfdb7a5ce1bb (diff) |
Fix binary_heap_test max_len
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r-- | pkg/priority_queue/binary_heap_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |