Skip to content

test(diagnostic_bridge): label test_integration as an integration test#443

Merged
bburda merged 1 commit into
mainfrom
fix/diagnostic-bridge-integration-label
Jun 20, 2026
Merged

test(diagnostic_bridge): label test_integration as an integration test#443
bburda merged 1 commit into
mainfrom
fix/diagnostic-bridge-integration-label

Conversation

@bburda

@bburda bburda commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

test/test_integration.test.py in ros2_medkit_diagnostic_bridge is a launch test registered with add_launch_test, which defaults its ctest LABELS to launch_test. The Pixi unit task runs colcon test --ctest-args -LE 'linter|integration', which does not exclude the launch_test label, so this launch test ran in the unit phase together with all other unit tests in a single colcon invocation. Under that load the node sometimes did not handle the launch SIGINT within the 5s shutdown window, so launch escalated to SIGTERM and the post-shutdown assertExitCodes check failed with exit code -15.

This overrides the label to integration via set_tests_properties (the pattern used by ros2_medkit_fault_manager and ros2_medkit_integration_tests), so the test runs in the integration phase and is excluded from the unit phase. The node shutdown code is unchanged.

Issue

No separate tracking issue - small CI test-categorization fix.

Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

ctest -N -L integration lists test_integration and ctest -V shows Labels: integration; ctest -N -LE 'linter|integration' no longer lists it. The package unit test (test_diagnostic_bridge) still passes.

Checklist

  • Breaking changes are clearly described (none)
  • Tests were added or updated if needed (test categorization only)
  • Docs were updated if behavior or public API changed (no behavior or API change)

Copilot AI review requested due to automatic review settings June 20, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates ros2_medkit_diagnostic_bridge’s launch test registration so the package’s integration launch test can be excluded from the unit-test phase and only run when integration tests are explicitly selected.

Changes:

  • Adds an integration label to test_integration so colcon test --ctest-args -LE integration skips it.
  • Documents why the label is required (to avoid intermittent shutdown timing failures under unit-test load).

Comment thread src/ros2_medkit_diagnostic_bridge/CMakeLists.txt
add_launch_test() defaults the launch test's ctest LABELS to "launch_test",
which the unit selector (colcon test -LE 'linter|integration') does not
exclude. So the launch test ran in the unit phase together with all other
unit tests in a single colcon invocation; under that load the node could
miss the launch SIGINT shutdown window and get killed with SIGTERM, failing
the post-shutdown exit-code check. Override the label to "integration" via
set_tests_properties (the repo convention) so it runs only in the
integration phase. No code change.
@bburda bburda force-pushed the fix/diagnostic-bridge-integration-label branch from 6bba87c to 1e834e4 Compare June 20, 2026 07:43
@bburda bburda self-assigned this Jun 20, 2026
@bburda bburda closed this Jun 20, 2026
@bburda bburda reopened this Jun 20, 2026
@bburda bburda merged commit 3ad3811 into main Jun 20, 2026
14 checks passed
@bburda bburda deleted the fix/diagnostic-bridge-integration-label branch June 20, 2026 09:02
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.

3 participants