Skip to content

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

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

Fix wrench transformer namespace test flake (backport #2492)#2495
christophfroehlich merged 1 commit into
kiltedfrom
mergify/bp/kilted/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).

@mergify

mergify Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@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.91%. Comparing base (4139208) to head (ef03b6b).
⚠️ Report is 3 commits behind head on kilted.

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             @@
##           kilted    #2495      +/-   ##
==========================================
- Coverage   86.92%   86.91%   -0.02%     
==========================================
  Files         156      156              
  Lines       15583    15577       -6     
  Branches     1340     1339       -1     
==========================================
- Hits        13545    13538       -7     
- Misses       1568     1571       +3     
+ Partials      470      468       -2     
Flag Coverage Δ
unittests 86.91% <33.33%> (-0.02%) ⬇️

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%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christophfroehlich
christophfroehlich merged commit d69222a into kilted Jul 29, 2026
14 of 15 checks passed
@christophfroehlich
christophfroehlich deleted the mergify/bp/kilted/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