Skip to content

Commit

Permalink
fix flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamluzsi committed Jun 12, 2024
1 parent 546059e commit ed6bc22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clock/Clock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func TestNewTicker(t *testing.T) {
}()

time.Sleep(time.Second / 4)
assert.True(t, 100/4 <= atomic.LoadInt64(&ticks))
assert.True(t, 100/4*failureRateMultiplier <= atomic.LoadInt64(&ticks))
})

s.Test("duration is scaled", func(t *testcase.T) {
Expand All @@ -353,7 +353,7 @@ func TestNewTicker(t *testing.T) {
}()

time.Sleep(time.Second / 4)
assert.True(t, 100/4 <= atomic.LoadInt64(&ticks))
assert.True(t, 100/4*failureRateMultiplier <= atomic.LoadInt64(&ticks))
})

s.Test("duration is scaled midflight", func(t *testcase.T) {
Expand Down

0 comments on commit ed6bc22

Please sign in to comment.