Skip to content

Commit e01342d

Browse files
committed
Fix intermittent test failure in TestLevelQueue
Fix #15776 Signed-off-by: Andrew Thornton <[email protected]>
1 parent d4f28fd commit e01342d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/queue/queue_disk_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,15 @@ func TestLevelQueue(t *testing.T) {
7070
}()
7171

7272
result1 := <-handleChan
73+
result2 := <-handleChan
74+
75+
if result1.TestString != test1.TestString {
76+
result1, result2 = result2, result1
77+
}
78+
7379
assert.Equal(t, test1.TestString, result1.TestString)
7480
assert.Equal(t, test1.TestInt, result1.TestInt)
7581

76-
result2 := <-handleChan
7782
assert.Equal(t, test2.TestString, result2.TestString)
7883
assert.Equal(t, test2.TestInt, result2.TestInt)
7984

0 commit comments

Comments
 (0)