Skip to content

Fixes WakeUp test flakiness#1164

Merged
facontidavide merged 1 commit into
BehaviorTree:masterfrom
pepeRossRobotics:fix/steady-clock
Jul 15, 2026
Merged

Fixes WakeUp test flakiness#1164
facontidavide merged 1 commit into
BehaviorTree:masterfrom
pepeRossRobotics:fix/steady-clock

Conversation

@pepeRossRobotics

Copy link
Copy Markdown
Contributor

Addresses test flakiness in the WakeUp test by switching from system_clock to steady_clock for duration measurements.

  • system_clock is susceptible to system time adjustments (e.g., NTP, DST), which can lead to unreliable duration calculations and intermittent test failures.
  • steady_clock provides a monotonic clock, ensuring accurate and consistent elapsed time measurements, thereby improving test reliability.
  • Adjusts the assertion threshold to 100ms to accommodate potential scheduler jitter on loaded CI runners, while still verifying prompt wake-up behavior.

The `WakeUp.BasicTest` previously used `system_clock`, which is not monotonic and can be affected by system time adjustments (NTP, DST). This made the test susceptible to flaky failures.

This change switches to `steady_clock` for robust, monotonic time measurement. Additionally, the assertion threshold is increased from `25ms` to `100ms` to provide adequate headroom for scheduler jitter, especially on loaded CI environments.
@facontidavide facontidavide merged commit 99935a0 into BehaviorTree:master Jul 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants