Skip to content

Commit

Permalink
Fix intermittent test failure in TestLevelQueue
Browse files Browse the repository at this point in the history
Fix go-gitea#15776

Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath committed May 7, 2021
1 parent d4f28fd commit e01342d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/queue/queue_disk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,15 @@ func TestLevelQueue(t *testing.T) {
}()

result1 := <-handleChan
result2 := <-handleChan

if result1.TestString != test1.TestString {
result1, result2 = result2, result1
}

assert.Equal(t, test1.TestString, result1.TestString)
assert.Equal(t, test1.TestInt, result1.TestInt)

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

Expand Down

0 comments on commit e01342d

Please sign in to comment.