From 3391163f9c0e9ae6ac50bcedf6d5202ec20e37f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0tibran=C3=BD?= Date: Wed, 22 Oct 2025 10:39:19 +0200 Subject: [PATCH] Check that we see less calls than allowed maximum. (#112785) Check that we see less calls than allowed maximum. --- pkg/storage/unified/search/bleve_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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())