Skip to content

Commit b50135f

Browse files
committed
Relax an expectation in the Ticker tests
The test is racy and occasionally fails with "4 (int) != 3 (int)".
1 parent ac6203b commit b50135f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/controller/runtime/ticker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func TestTicker(t *testing.T) {
9595
assert.NilError(t, ticker.Start(ctx, th, tq))
9696
<-ctx.Done()
9797

98-
assert.Equal(t, len(called), 3)
98+
assert.Assert(t, len(called) > 2)
9999
assert.Equal(t, called[0], expected, "expected at 0ms")
100100
assert.Equal(t, called[1], expected, "expected at 100ms")
101101
assert.Equal(t, called[2], expected, "expected at 200ms")

0 commit comments

Comments
 (0)