fix node graph test with Connext and CycloneDDS returning actual data (#1245)
* fix node graph test with Connext and CycloneDDS returning actual data Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com> * use ADD_FAILURE() Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
This commit is contained in:
parent
3b1319b23d
commit
48d3603018
1 changed files with 20 additions and 2 deletions
|
@ -170,10 +170,28 @@ TEST_F(TestNodeGraph, get_info_by_topic)
|
||||||
EXPECT_EQ(rclcpp::EndpointType::Publisher, const_publisher_endpoint_info.endpoint_type());
|
EXPECT_EQ(rclcpp::EndpointType::Publisher, const_publisher_endpoint_info.endpoint_type());
|
||||||
|
|
||||||
rclcpp::QoS actual_qos = publisher_endpoint_info.qos_profile();
|
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);
|
EXPECT_EQ(0u, actual_qos.get_rmw_qos_profile().depth);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ADD_FAILURE() << "unexpected history";
|
||||||
|
}
|
||||||
|
|
||||||
rclcpp::QoS const_actual_qos = const_publisher_endpoint_info.qos_profile();
|
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);
|
EXPECT_EQ(0u, const_actual_qos.get_rmw_qos_profile().depth);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ADD_FAILURE() << "unexpected history";
|
||||||
|
}
|
||||||
|
|
||||||
auto endpoint_gid = publisher_endpoint_info.endpoint_gid();
|
auto endpoint_gid = publisher_endpoint_info.endpoint_gid();
|
||||||
auto const_endpoint_gid = const_publisher_endpoint_info.endpoint_gid();
|
auto const_endpoint_gid = const_publisher_endpoint_info.endpoint_gid();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue