Check that we see less calls than allowed maximum. (#112785)

Check that we see less calls than allowed maximum.
This commit is contained in:
Peter Štibraný
2025-10-22 08:39:19 +00:00
committed by GitHub
parent 1abb5aa0f9
commit 3391163f9c
+2 -2
View File
@@ -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())