ros2_controllers icon indicating copy to clipboard operation
ros2_controllers copied to clipboard

TestWrenchTransformer is flaky

Open christophfroehlich opened this issue 4 months ago • 1 comments

Describe the bug

    [  FAILED  ] TestWrenchTransformer.NamespaceNormalizationCustomNamespace
    
     1 FAILED TEST
    -- run_test.py: return code 1
    -- run_test.py: inject classname prefix into gtest result file '/home/runner/work/ros2_control_ci/ros2_control_ci/.work/target_ws/build/force_torque_sensor_broadcaster/test_results/force_torque_sensor_broadcaster/test_wrench_transformer.gtest.xml'
    -- run_test.py: verify result file '/home/runner/work/ros2_control_ci/ros2_control_ci/.work/target_ws/build/force_torque_sensor_broadcaster/test_results/force_torque_sensor_broadcaster/test_wrench_transformer.gtest.xml'
  >>>
build/force_torque_sensor_broadcaster/test_results/force_torque_sensor_broadcaster/test_wrench_transformer.gtest.xml: 13 tests, 0 errors, 1 failure, 0 skipped
- force_torque_sensor_broadcaster.TestWrenchTransformer NamespaceNormalizationCustomNamespace
  <<< failure message
    /home/runner/work/ros2_control_ci/ros2_control_ci/.work/target_ws/src/ros-controls/ros2_controllers/force_torque_sensor_broadcaster/test/test_wrench_transformer.cpp:639
    Value of: found
      Actual: false
    Expected: true
    Publisher topic should be /my_robot/base_link/wrench
  >>>

To Reproduce https://github.com/ros-controls/ros2_controllers/issues/2296 https://github.com/ros-controls/ros2_control_ci/issues/874

christophfroehlich avatar Jul 25 '26 06:07 christophfroehlich

Hi, I’d like to work on this issue.

The namespace tests currently use a fixed wait followed by a single ROS graph snapshot, so I plan to investigate whether delayed graph discovery causes the intermittent failure.

I’ll keep the change test-only and narrowly scoped:

  • replace the timing-sensitive single graph check with bounded polling;
  • reuse the existing graph-query/test helpers where practical;
  • cover both root and custom namespace checks consistently;
  • avoid changing production code or merely increasing the fixed sleep;
  • run the full force_torque_sensor_broadcaster test suite and repeated namespace-test executions.

Please let me know if there is any unlinked work already underway.

dlanov avatar Jul 28 '26 20:07 dlanov