From db33fbbcfa5218fa110d8a88240de499ae106c47 Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Sat, 7 Nov 2026 19:23:40 +0100 Subject: [PATCH] test: don't assume a tick rate in Reactive.TestLogging The test asserted at least 5 ticks while a 100 ms Sleep runs, i.e. that each 10 ms wait of tickWhileRunning() returns on time. A loaded macOS runner took ~33 ms per wait and failed with 3 ticks (master run 42389941988, 6b8e68ce). The test checks that the observer counts match the tick count; the only guaranteed minimum is 2 ticks (one RUNNING, the final SUCCESS). Co-Authored-By: Claude Opus 5.5 --- tests/gtest_reactive.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/gtest_reactive.cpp b/tests/gtest_reactive.cpp index 391874a7b..92cf3d0ac 100644 --- a/tests/gtest_reactive.cpp +++ b/tests/gtest_reactive.cpp @@ -157,7 +157,9 @@ TEST(Reactive, TestLogging) ASSERT_EQ(ret, NodeStatus::SUCCESS); int num_ticks = counters[0]; - ASSERT_GE(num_ticks, 5); + // At least one RUNNING tick (Sleep) and the final SUCCESS tick. The exact + // count depends on how long each wait takes, which varies on loaded CI runners. + ASSERT_GE(num_ticks, 2); ASSERT_EQ(observer.getStatistics("testA").success_count, num_ticks); ASSERT_EQ(observer.getStatistics("success").success_count, num_ticks);