Skip to content

Commit 4690bea

Browse files
test: don't assume a tick rate in Reactive.TestLogging (#1285)
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, 6b8e68c). 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 <noreply@anthropic.com>
1 parent 24e7755 commit 4690bea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/gtest_reactive.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ TEST(Reactive, TestLogging)
157157
ASSERT_EQ(ret, NodeStatus::SUCCESS);
158158

159159
int num_ticks = counters[0];
160-
ASSERT_GE(num_ticks, 5);
160+
// At least one RUNNING tick (Sleep) and the final SUCCESS tick. The exact
161+
// count depends on how long each wait takes, which varies on loaded CI runners.
162+
ASSERT_GE(num_ticks, 2);
161163

162164
ASSERT_EQ(observer.getStatistics("testA").success_count, num_ticks);
163165
ASSERT_EQ(observer.getStatistics("success").success_count, num_ticks);

0 commit comments

Comments
 (0)