From e6dca3059f1c14a700a86200c9561be13934ae40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20BIDON?= Date: Fri, 23 Jan 2026 23:12:57 +0100 Subject: [PATCH] test(condition): fixed flaky test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fixes #38 Signed-off-by: Frédéric BIDON --- internal/assertions/condition_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/assertions/condition_test.go b/internal/assertions/condition_test.go index 159b9bfd4..6ab66d6c6 100644 --- a/internal/assertions/condition_test.go +++ b/internal/assertions/condition_test.go @@ -238,7 +238,7 @@ func TestConditionEventuallyWithT(t *testing.T) { Len(t, mock.errors, expectedErrors, "expected 2 errors from the condition, and 2 additional errors from Eventually") expectedCalls := int(testTimeout / testTick) - if counter != expectedCalls && counter != expectedCalls+1 { // it may be 5 or 6 depending on how the test schedules + if counter < expectedCalls-1 || counter > expectedCalls+1 { // it may be 4, 5 or 6 depending on how the test schedules t.Errorf("expected %d calls to the condition, but got %d", expectedCalls, counter) } })