Skip to content

Fix wrench transformer namespace test flake (backport #2492) - #2494

Merged
christophfroehlich merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-2492
Jul 29, 2026
Merged

Fix wrench transformer namespace test flake (backport #2492)#2494
christophfroehlich merged 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-2492

Conversation

@mergify

@mergify mergify Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the flaky wrench transformer namespace tests by replacing timing-sensitive, one-shot ROS graph checks with bounded polling.

Changes

  • Add a test helper that waits for a publisher on an exact topic using the ROS graph API.
  • Update the root-namespace and custom-namespace tests to use bounded polling.
  • Preserve the existing topic-name assertions.
  • Keep the change limited to test code; no production behavior is modified.

Testing

  • colcon build --symlink-install --packages-up-to force_torque_sensor_broadcaster --cmake-args -DBUILD_TESTING=ON

  • colcon test --packages-select force_torque_sensor_broadcaster --event-handlers console_cohesion+

  • colcon test-result --verbose

  • Repeated both namespace tests 100 times:

    • TestWrenchTransformer.NamespaceNormalizationRootNamespace
    • TestWrenchTransformer.NamespaceNormalizationCustomNamespace
  • pre-commit run --files force_torque_sensor_broadcaster/test/test_wrench_transformer.cpp

  • git diff --check

Results:

  • 35 package tests
  • 0 errors
  • 0 failures
  • 0 skipped
  • 100 repeated namespace-test iterations passed
  • All applicable pre-commit checks passed

Closes #2487

AI assistance

Claude Code assisted with analyzing and preparing the narrowly scoped test change. I manually reviewed the complete diff and verified the build, package tests, repeated stress tests, formatting, lint, and whitespace-check results.


This is an automatic backport of pull request #2492 done by [Mergify](https://mergify.com).

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.00%. Comparing base (ce994b5) to head (ac9ae4e).
⚠️ Report is 3 commits behind head on jazzy.

Files with missing lines Patch % Lines
...ensor_broadcaster/test/test_wrench_transformer.cpp 33.33% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            jazzy    #2494   +/-   ##
=======================================
  Coverage   86.00%   86.00%           
=======================================
  Files         158      158           
  Lines       15881    15875    -6     
  Branches     1399     1398    -1     
=======================================
- Hits        13659    13654    -5     
  Misses       1719     1719           
+ Partials      503      502    -1     
Flag Coverage Δ
unittests 86.00% <33.33%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ensor_broadcaster/test/test_wrench_transformer.cpp 91.80% <33.33%> (+0.17%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich
christophfroehlich merged commit e6412d6 into jazzy Jul 29, 2026
15 checks passed
@christophfroehlich
christophfroehlich deleted the mergify/bp/jazzy/pr-2492 branch July 29, 2026 08:23
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