diff --git a/pkg/storage/unified/search/bleve_test.go b/pkg/storage/unified/search/bleve_test.go index e34712f934d..4caa3609f7e 100644 --- a/pkg/storage/unified/search/bleve_test.go +++ b/pkg/storage/unified/search/bleve_test.go @@ -1506,8 +1506,8 @@ func TestConcurrentIndexUpdateAndSearchWithIndexMinUpdateInterval(t *testing.T) cancel() wg.Wait() - expectedUpdateCalls := int64(testTime / minInterval) - require.InDelta(t, expectedUpdateCalls, updateCalls.Load(), float64(expectedUpdateCalls/2)) + expectedMaxCalls := int64(testTime / minInterval) + require.LessOrEqual(t, updateCalls.Load(), expectedMaxCalls+1) require.Greater(t, attemptedUpdates.Load(), updateCalls.Load()) t.Log("Attempted updates:", attemptedUpdates.Load(), "update calls:", updateCalls.Load())