From 7f7c29a0cf6d759301bc16fa727fd3a4ec756d3f Mon Sep 17 00:00:00 2001 From: kalo <24719519+KaloyanTanev@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:51:13 +0300 Subject: [PATCH] app: fix flaky TestStartChecker --- app/monitoringapi_internal_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/monitoringapi_internal_test.go b/app/monitoringapi_internal_test.go index 6e6c0ecb9..208ed47d3 100644 --- a/app/monitoringapi_internal_test.go +++ b/app/monitoringapi_internal_test.go @@ -163,10 +163,13 @@ func TestStartChecker(t *testing.T) { return true }, waitFor, tickInterval) } else { + // Don't advance the clock further: only one vapi call was sent, so the checker + // observing two more epoch rollovers would swap it out and permanently flip + // readiness to errReadyVCNotConnected. The ticks already fired above are enough + // for the checker to evaluate readiness as nil, which is then stable. require.Eventually(t, func() bool { - advanceClock(t, ctx, clock, slotDuration) return readyErrFunc() == nil - }, waitFor, tickInterval) + }, 5*time.Second, tickInterval) } }) }