Skip to content

Commit 085f161

Browse files
authored
Do not test the value of the history policy when testing the get_publishers/subscriptions_info_by_topic() methods (#1626)
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
1 parent 893679e commit 085f161

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

rclcpp/test/rclcpp/node_interfaces/test_node_graph.cpp

+2-20
Original file line numberDiff line numberDiff line change
@@ -364,28 +364,10 @@ TEST_F(TestNodeGraph, get_info_by_topic)
364364
EXPECT_EQ(rclcpp::EndpointType::Publisher, const_publisher_endpoint_info.endpoint_type());
365365

366366
rclcpp::QoS actual_qos = publisher_endpoint_info.qos_profile();
367-
switch (actual_qos.get_rmw_qos_profile().history) {
368-
case RMW_QOS_POLICY_HISTORY_KEEP_LAST:
369-
EXPECT_EQ(1u, actual_qos.get_rmw_qos_profile().depth);
370-
break;
371-
case RMW_QOS_POLICY_HISTORY_UNKNOWN:
372-
EXPECT_EQ(0u, actual_qos.get_rmw_qos_profile().depth);
373-
break;
374-
default:
375-
ADD_FAILURE() << "unexpected history";
376-
}
367+
EXPECT_EQ(actual_qos.reliability(), rclcpp::ReliabilityPolicy::Reliable);
377368

378369
rclcpp::QoS const_actual_qos = const_publisher_endpoint_info.qos_profile();
379-
switch (const_actual_qos.get_rmw_qos_profile().history) {
380-
case RMW_QOS_POLICY_HISTORY_KEEP_LAST:
381-
EXPECT_EQ(1u, const_actual_qos.get_rmw_qos_profile().depth);
382-
break;
383-
case RMW_QOS_POLICY_HISTORY_UNKNOWN:
384-
EXPECT_EQ(0u, const_actual_qos.get_rmw_qos_profile().depth);
385-
break;
386-
default:
387-
ADD_FAILURE() << "unexpected history";
388-
}
370+
EXPECT_EQ(const_actual_qos.reliability(), rclcpp::ReliabilityPolicy::Reliable);
389371

390372
auto endpoint_gid = publisher_endpoint_info.endpoint_gid();
391373
auto const_endpoint_gid = const_publisher_endpoint_info.endpoint_gid();

0 commit comments

Comments
 (0)