fix(rcl_action): use RMW isolation for cross-node tests#1311
Merged
Conversation
test_action_communication, test_action_interaction, and test_graph all spawn two nodes in separate processes that must discover each other. These tests were using ZENOH_CONFIG_OVERRIDE=scouting/multicast/enabled=true as a workaround, but multicast is unreliable in CI environments (and unavailable on Windows), causing intermittent failures. Replace the multicast workaround with ament_add_ros_isolated_gtest_test, which wraps the test with run_test_isolated.py and rmw_test_isolation_start() to start an in-process router and configure all subprocesses to connect to it. This is the same mechanism already used by rcl/test/CMakeLists.txt for its own test_graph and other cross-node tests. Signed-off-by: yuanyuyuan <az6980522@gmail.com>
f0eb7db to
3eb1762
Compare
fujitatomoya
approved these changes
Mar 31, 2026
Collaborator
|
Pulls: #1311 |
ahcorde
approved these changes
Mar 31, 2026
This was referenced Apr 13, 2026
Member
|
@Mergifyio backport kilted |
✅ Backports have been createdDetails
|
mergify Bot
pushed a commit
that referenced
this pull request
Apr 13, 2026
test_action_communication, test_action_interaction, and test_graph all spawn two nodes in separate processes that must discover each other. These tests were using ZENOH_CONFIG_OVERRIDE=scouting/multicast/enabled=true as a workaround, but multicast is unreliable in CI environments (and unavailable on Windows), causing intermittent failures. Replace the multicast workaround with ament_add_ros_isolated_gtest_test, which wraps the test with run_test_isolated.py and rmw_test_isolation_start() to start an in-process router and configure all subprocesses to connect to it. This is the same mechanism already used by rcl/test/CMakeLists.txt for its own test_graph and other cross-node tests. Signed-off-by: yuanyuyuan <az6980522@gmail.com> (cherry picked from commit 4d8f22a)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_action_communication,test_action_interaction, andtest_graphinrcl_actionall spawn two nodes in separate processes that must discover each other. These tests were usingZENOH_CONFIG_OVERRIDE=scouting/multicast/enabled=trueas a workaround for Zenoh's default non-multicast config, but multicast is unreliable in CI environments and unavailable on Windows, causingtest_graph__rmw_zenoh_cppto fail withrcl_action_get_server_names_and_types_by_nodereturningRCL_RET_ERROR.Key Changes
ament_add_gtest_test+ZENOH_CONFIG_OVERRIDE=scouting/multicast/enabled=truewithament_add_ros_isolated_gtest_testfor all three cross-node testsament_add_ros_isolated_gtest_testwraps the test withrun_test_isolated.py, which callsrmw_test_isolation_start()to start an in-process router and configure all processes to connect to it — no multicast requiredrcl/test/CMakeLists.txtfor its owntest_graphand other cross-node testsDeep Dive
rmw_test_isolation_start()(source) starts an in-process Zenoh router on a random port and writesZENOH_CONFIG_OVERRIDE=connect/endpoints=[tcp/127.0.0.1:<port>]into the environment (line 136–139). All processes that inherit the environment connect to this router and share the same discovery graph, making multicast unnecessary.Breaking Changes
None
Closes ros2/rmw_zenoh#932