Skip to content

Commit

Permalink
test: fix race condition in enforce_identity_test.go
Browse files Browse the repository at this point in the history
On fast system, the first and second time could have been the same.
And thus the test failed.

Changing the condition to allow the same time.

Signed-off-by: Petr Vobornik <[email protected]>
  • Loading branch information
pvoborni authored and frasertweedale committed Aug 22, 2024
1 parent 3efb61e commit 34a3d42
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ func TestEnforceIdentityOrder(t *testing.T) {

// Check expectations
require.Condition(t, func() (success bool) {
return order["first"].Compare(order["second"]) < 0
return order["first"].Compare(order["second"]) <= 0
})
}
}
Expand Down

0 comments on commit 34a3d42

Please sign in to comment.