De-flake trajectory_cache _with_move_group tests#3777
Open
nbbrooks wants to merge 2 commits into
Open
Conversation
The gtest_with_move_group.py fixture launched the test binary on a fixed TimerAction(period=3.0). On slow CI runs the joint_state_broadcaster had not activated by t=3s, so /joint_states was not yet publishing and the test failed at MoveGroupInterface::getCurrentState() with "Failed to fetch current robot state". This flaked across Noble, Resolute, jazzy, and kilted for the _with_move_group test family. Gate the test binary launch on joint_state_broadcaster activation instead: spawn the broadcaster as its own ExecuteProcess and start the gtest node from an OnProcessExit handler. The spawner exits 0 only after the controller is loaded, configured, and activated, guaranteeing /joint_states is publishing before the test runs. This removes the wall-clock race entirely. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3777 +/- ##
==========================================
+ Coverage 46.23% 46.29% +0.06%
==========================================
Files 726 726
Lines 59512 59508 -4
Branches 7622 7623 +1
==========================================
+ Hits 27509 27541 +32
+ Misses 31836 31800 -36
Partials 167 167 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gtest_with_move_group.py fixture launched the test binary on a fixed TimerAction(period=3.0). On slow CI runs the joint_state_broadcaster had not activated by t=3s, so /joint_states was not yet publishing and the test failed at MoveGroupInterface::getCurrentState() with "Failed to fetch current robot state". This flaked across Noble, Resolute, jazzy, and kilted for the _with_move_group test family.
Gate the test binary launch on joint_state_broadcaster activation instead: spawn the broadcaster as its own ExecuteProcess and start the gtest node from an OnProcessExit handler. The spawner exits 0 only after the controller is loaded, configured, and activated, guaranteeing /joint_states is publishing before the test runs. This removes the wall-clock race entirely.
Description
Please explain the changes you made, including a reference to the related issue if applicable
Checklist