Bug report
OperationHandlersFixtureTest.ListExecutionsReturnsTrackedActionGoal (gateway test_operation_handlers) is flaky under AddressSanitizer/ThreadSanitizer runs. It fails intermittently and passes on re-run, so it is a timing flake rather than a real regression.
Steps to reproduce
- Run the gateway test suite under the
sanitizer-tsan (or sanitizer-asan) CI job, or under heavy parallel load.
- Observe
test_operation_handlers fail occasionally.
Expected behavior
The test deterministically observes the tracked action goal it created and passes.
Actual behavior
src/ros2_medkit_gateway/test/test_operation_handlers.cpp:481: Failure
Actual: false
Expected: true
[ FAILED ] OperationHandlersFixtureTest.ListExecutionsReturnsTrackedActionGoal
Failing job: https://github.com/selfpatch/ros2_medkit/actions/runs/28042302017/job/83011417297
The same job passed on re-run (no code change), confirming the flake.
Environment
- ros2_medkit version: main
- ROS 2 distro: Jazzy (TSan job)
- OS: Ubuntu 24.04
Additional information
Listing a tracked action execution depends on the DDS action client/server handshake completing within the assertion's wait. Under sanitizer slowdown that handshake can land after the check, so the goal is not yet listed and the boolean assertion at line 481 reads false. Fix direction: poll/wait for the tracked goal to appear (deterministic wait) instead of asserting once, mirroring how other timing-sensitive tests were hardened.
Bug report
OperationHandlersFixtureTest.ListExecutionsReturnsTrackedActionGoal(gatewaytest_operation_handlers) is flaky under AddressSanitizer/ThreadSanitizer runs. It fails intermittently and passes on re-run, so it is a timing flake rather than a real regression.Steps to reproduce
sanitizer-tsan(orsanitizer-asan) CI job, or under heavy parallel load.test_operation_handlersfail occasionally.Expected behavior
The test deterministically observes the tracked action goal it created and passes.
Actual behavior
Failing job: https://github.com/selfpatch/ros2_medkit/actions/runs/28042302017/job/83011417297
The same job passed on re-run (no code change), confirming the flake.
Environment
Additional information
Listing a tracked action execution depends on the DDS action client/server handshake completing within the assertion's wait. Under sanitizer slowdown that handshake can land after the check, so the goal is not yet listed and the boolean assertion at line 481 reads false. Fix direction: poll/wait for the tracked goal to appear (deterministic wait) instead of asserting once, mirroring how other timing-sensitive tests were hardened.