Repository navigation
De-flake servo and hybrid_planning launch fixtures (backport #3809) - #3871
Conversation
Same fix as #3777, applied to the four remaining fixtures with the pattern. Each launched its gtest node on a fixed TimerAction while controller spawners ran in parallel. Under load the spawner has not finished activating the controller when the timer fires, so the test starts against a topic with no publisher and fails intermittently: TimerAction(period=N, actions=[<gtest>]) Replaced with a gate on the last spawner exiting -- spawner exits 0 only after the controller is active, so the gtest is guaranteed a live publisher: RegisterEventHandler(OnProcessExit(target_action=<last_spawner>, on_exit=[<gtest>])) Fixtures changed: moveit_ros/moveit_servo/tests/launch/servo_ros_integration.test.py moveit_ros/moveit_servo/tests/launch/servo_cpp_integration.test.py moveit_ros/moveit_servo/tests/launch/servo_utils.test.py moveit_ros/hybrid_planning/test/launch/test_basic_integration.test.py Verified locally in the Resolute audit container before this change was first written: servo 4/4 iterations green, servo_utils 3/3, hybrid_planning 3/3. Previously each flaked at roughly the same rate as the trajectory_cache family #3777 addressed. test_basic_integration.test.py additionally needed RegisterEventHandler and OnProcessExit imported -- it calls them unqualified, unlike the servo fixtures which use launch.actions.RegisterEventHandler. Without the import the fixture raises NameError at launch. Not changed, because they chain TimerActions across ros2_control and several spawners rather than gating on one terminal timer -- picking the correct target_action needs a real reproducer of each family's failure: moveit_ros/planning/planning_scene_monitor/test/launch/planning_scene_monitor.test.py moveit_ros/tests/launch/move_group_api.test.py Co-authored-by: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 40f3140)
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## jazzy #3871 +/- ##
==========================================
+ Coverage 46.25% 46.26% +0.01%
==========================================
Files 718 718
Lines 59188 59188
Branches 7598 7599 +1
==========================================
+ Hits 27374 27376 +2
+ Misses 31650 31647 -3
- Partials 164 165 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Same fix as #3777, applied to the four remaining launch fixtures with the pattern.
Each launches its gtest node on a fixed
TimerActionwhile controller spawners run in parallel. Under load the spawner hasn't finished activating the controller when the timer fires, so the test starts against a topic with no publisher and fails intermittently:Replaced with a gate on the last spawner exiting —
spawnerexits 0 only after the controller is active, so the gtest is guaranteed a live publisher:Fixtures changed
moveit_ros/moveit_servo/tests/launch/servo_ros_integration.test.pyServoRosFixturemoveit_ros/moveit_servo/tests/launch/servo_cpp_integration.test.pymoveit_ros/moveit_servo/tests/launch/servo_utils.test.pymoveit_ros/hybrid_planning/test/launch/test_basic_integration.test.pyVerified in a Resolute container: servo 4/4 iterations green, servo_utils 3/3, hybrid_planning 3/3. Each previously flaked at roughly the rate the trajectory_cache family did before #3777.
test_basic_integration.test.pyadditionally neededRegisterEventHandlerandOnProcessExitimported — it calls them unqualified, unlike the servo fixtures which uselaunch.actions.RegisterEventHandler. Without the import the fixture raisesNameErrorat launch.Why this is worth landing
This family is currently costing signal on unrelated PRs. The
rolling-ci + deprecation checkandrolling-ci + ccovfailures on #3807 weretest_get_cartesian_path_request_features_with_move_groupandtest_motion_plan_request_features_with_move_group— same root cause, different fixture.Deliberately not changed
These chain
TimerActions acrossros2_controland several spawners rather than gating on one terminal timer, so picking the righttarget_actionneeds a real reproducer of each family's failure mode:moveit_ros/planning/planning_scene_monitor/test/launch/planning_scene_monitor.test.pymoveit_ros/tests/launch/move_group_api.test.pyChecklist
🤖 Generated with Claude Code
This is an automatic backport of pull request #3809 done by Mergify.