From 889f215461c36e37805651dab6d29a705dc6f8f7 Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Fri, 9 Apr 2021 17:48:23 -0300 Subject: [PATCH] Do not test the value of the history policy when testing the get_publishers/subscriptions_info_by_topic() methods Signed-off-by: Ivan Santiago Paunovic --- .../node_interfaces/test_node_graph.cpp | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/rclcpp/test/rclcpp/node_interfaces/test_node_graph.cpp b/rclcpp/test/rclcpp/node_interfaces/test_node_graph.cpp index 6690b88bf6..6a44d7abf7 100644 --- a/rclcpp/test/rclcpp/node_interfaces/test_node_graph.cpp +++ b/rclcpp/test/rclcpp/node_interfaces/test_node_graph.cpp @@ -364,28 +364,10 @@ TEST_F(TestNodeGraph, get_info_by_topic) EXPECT_EQ(rclcpp::EndpointType::Publisher, const_publisher_endpoint_info.endpoint_type()); rclcpp::QoS actual_qos = publisher_endpoint_info.qos_profile(); - switch (actual_qos.get_rmw_qos_profile().history) { - case RMW_QOS_POLICY_HISTORY_KEEP_LAST: - EXPECT_EQ(1u, actual_qos.get_rmw_qos_profile().depth); - break; - case RMW_QOS_POLICY_HISTORY_UNKNOWN: - EXPECT_EQ(0u, actual_qos.get_rmw_qos_profile().depth); - break; - default: - ADD_FAILURE() << "unexpected history"; - } + EXPECT_EQ(actual_qos.reliability(), rclcpp::ReliabilityPolicy::Reliable); rclcpp::QoS const_actual_qos = const_publisher_endpoint_info.qos_profile(); - switch (const_actual_qos.get_rmw_qos_profile().history) { - case RMW_QOS_POLICY_HISTORY_KEEP_LAST: - EXPECT_EQ(1u, const_actual_qos.get_rmw_qos_profile().depth); - break; - case RMW_QOS_POLICY_HISTORY_UNKNOWN: - EXPECT_EQ(0u, const_actual_qos.get_rmw_qos_profile().depth); - break; - default: - ADD_FAILURE() << "unexpected history"; - } + EXPECT_EQ(const_actual_qos.reliability(), rclcpp::ReliabilityPolicy::Reliable); auto endpoint_gid = publisher_endpoint_info.endpoint_gid(); auto const_endpoint_gid = const_publisher_endpoint_info.endpoint_gid();