From c1f861a5e3a62218f44c520cf491ba58ce781f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Fri, 4 Oct 2024 12:23:27 +0200 Subject: [PATCH] Fixed test_events_executors in zenoh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- rclcpp/test/rclcpp/CMakeLists.txt | 2 +- .../rclcpp/executors/test_events_executor.cpp | 23 ++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/rclcpp/test/rclcpp/CMakeLists.txt b/rclcpp/test/rclcpp/CMakeLists.txt index f9e341087f..35fa8fdd32 100644 --- a/rclcpp/test/rclcpp/CMakeLists.txt +++ b/rclcpp/test/rclcpp/CMakeLists.txt @@ -555,7 +555,7 @@ if(TARGET test_executor_notify_waitable) target_link_libraries(test_executor_notify_waitable ${PROJECT_NAME} mimick rcpputils::rcpputils) endif() -ament_add_gtest(test_events_executor executors/test_events_executor.cpp TIMEOUT 5) +ament_add_gtest(test_events_executor executors/test_events_executor.cpp TIMEOUT 60) if(TARGET test_events_executor) target_link_libraries(test_events_executor ${PROJECT_NAME} ${test_msgs_TARGETS}) endif() diff --git a/rclcpp/test/rclcpp/executors/test_events_executor.cpp b/rclcpp/test/rclcpp/executors/test_events_executor.cpp index 13092b7067..a59e23a6f0 100644 --- a/rclcpp/test/rclcpp/executors/test_events_executor.cpp +++ b/rclcpp/test/rclcpp/executors/test_events_executor.cpp @@ -479,14 +479,21 @@ TEST_F(TestEventsExecutor, test_default_incompatible_qos_callbacks) const auto timeout = std::chrono::seconds(10); ex.spin_until_future_complete(log_msgs_future, timeout); - EXPECT_EQ( - "New subscription discovered on topic '/test_topic', requesting incompatible QoS. " - "No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY", - pub_log_msg); - EXPECT_EQ( - "New publisher discovered on topic '/test_topic', offering incompatible QoS. " - "No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY", - sub_log_msg); + + std::string rmw_implementation_str = std::string(rmw_get_implementation_identifier()); + if (rmw_implementation_str == "rmw_zenoh_cpp") { + EXPECT_EQ("", pub_log_msg); + EXPECT_EQ("", sub_log_msg); + } else { + EXPECT_EQ( + "New subscription discovered on topic '/test_topic', requesting incompatible QoS. " + "No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY", + pub_log_msg); + EXPECT_EQ( + "New publisher discovered on topic '/test_topic', offering incompatible QoS. " + "No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY", + sub_log_msg); + } rcutils_logging_set_output_handler(original_output_handler); }