diff --git a/rcl/test/rcl/test_rmw_impl_id_check.py.in b/rcl/test/rcl/test_rmw_impl_id_check.py.in
index c97068781..6e05e5705 100644
--- a/rcl/test/rcl/test_rmw_impl_id_check.py.in
+++ b/rcl/test/rcl/test_rmw_impl_id_check.py.in
@@ -43,6 +43,13 @@ def generate_test_description(
if rcl_assert_rmw_id_matches_env is not None:
env['RCL_ASSERT_RMW_ID_MATCHES'] = rcl_assert_rmw_id_matches_env
+ if rmw_implementation_env == 'rmw_zenoh_cpp':
+ # Since the test is purely local (checks on loaded rmw_implementation lib),
+ # avoid connection to a Zenoh router in case rmw_zenoh_cpp is loaded.
+ # This avoids unnecessary warning logs and saves time at rmw_init()
+ env['ZENOH_CONFIG_OVERRIDE'] = 'connect/endpoints=[]'
+ env['ZENOH_ROUTER_CHECK_ATTEMPTS'] = '-1'
+
executable_under_test = ExecuteProcess(
cmd=['@TEST_RMW_IMPL_ID_CHECK_EXECUTABLE_NAME@'],
name='@TEST_RMW_IMPL_ID_CHECK_EXECUTABLE_NAME@',
diff --git a/rcl_action/CMakeLists.txt b/rcl_action/CMakeLists.txt
index 07178f91c..4dd19b815 100644
--- a/rcl_action/CMakeLists.txt
+++ b/rcl_action/CMakeLists.txt
@@ -77,7 +77,7 @@ install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}
)
if(BUILD_TESTING)
- find_package(ament_cmake_gtest REQUIRED)
+ find_package(ament_cmake_ros REQUIRED)
find_package(ament_lint_auto REQUIRED)
find_package(osrf_testing_tools_cpp REQUIRED)
find_package(test_msgs REQUIRED)
@@ -136,25 +136,17 @@ if(BUILD_TESTING)
message(STATUS "Creating tests for '${rmw_implementation}'")
set(rmw_implementation_env_var RMW_IMPLEMENTATION=${rmw_implementation})
- # If the rmw_implementation is rmw_zenoh_cpp, run the tests with multicast discovery enabled.
- # Note: This is a temporary change that will be reverted before we branch into Kilted.
- if(rmw_implementation STREQUAL "rmw_zenoh_cpp")
- list(APPEND rmw_implementation_env_var
- ZENOH_CONFIG_OVERRIDE=scouting/multicast/enabled=true
- )
- endif()
-
- ament_add_gtest_test(test_action_communication
+ ament_add_ros_isolated_gtest_test(test_action_communication
TEST_NAME test_action_communication${target_suffix}
ENV ${rmw_implementation_env_var}
)
- ament_add_gtest_test(test_action_interaction
+ ament_add_ros_isolated_gtest_test(test_action_interaction
TEST_NAME test_action_interaction${target_suffix}
ENV ${rmw_implementation_env_var}
)
- ament_add_gtest_test(test_graph
+ ament_add_ros_isolated_gtest_test(test_graph
TEST_NAME test_graph${target_suffix}
ENV ${rmw_implementation_env_var}
TIMEOUT 180
diff --git a/rcl_action/package.xml b/rcl_action/package.xml
index 3244cbfca..d0d74df20 100644
--- a/rcl_action/package.xml
+++ b/rcl_action/package.xml
@@ -22,7 +22,7 @@
rmw
rosidl_runtime_c
- ament_cmake_gtest
+ ament_cmake_ros
ament_lint_common
ament_lint_auto
osrf_testing_tools_cpp