From 3ca729056f90dc88feb0731c911db3907d433ca7 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Thu, 29 May 2025 07:13:18 +0000 Subject: [PATCH] Assert HistoryQoS in test_ros2cli_daemon Signed-off-by: Mario Dominguez --- ros2cli/test/test_ros2cli_daemon.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ros2cli/test/test_ros2cli_daemon.py b/ros2cli/test/test_ros2cli_daemon.py index 9d0861ec5..751d84681 100644 --- a/ros2cli/test/test_ros2cli_daemon.py +++ b/ros2cli/test/test_ros2cli_daemon.py @@ -37,12 +37,13 @@ TEST_TOPIC_PUBLISHER_QOS = rclpy.qos.QoSProfile( reliability=rclpy.qos.ReliabilityPolicy.RELIABLE, durability=rclpy.qos.DurabilityPolicy.VOLATILE, - depth=1 + history=rclpy.qos.HistoryPolicy.KEEP_ALL ) TEST_TOPIC_SUBSCRIPTION_QOS = rclpy.qos.QoSProfile( reliability=rclpy.qos.ReliabilityPolicy.BEST_EFFORT, durability=rclpy.qos.DurabilityPolicy.VOLATILE, - depth=1 + history=rclpy.qos.HistoryPolicy.KEEP_LAST, + depth=8 ) TEST_SERVICE_NAME = '/test/service' TEST_SERVICE_TYPE = 'test_msgs/srv/Empty' @@ -213,6 +214,8 @@ def test_get_publishers_info_by_topic(daemon_node): TEST_TOPIC_PUBLISHER_QOS.durability assert test_publisher_info.qos_profile.reliability == \ TEST_TOPIC_PUBLISHER_QOS.reliability + assert test_publisher_info.qos_profile.history == \ + TEST_TOPIC_PUBLISHER_QOS.history def test_get_subscriptions_info_by_topic(daemon_node): @@ -226,6 +229,10 @@ def test_get_subscriptions_info_by_topic(daemon_node): TEST_TOPIC_SUBSCRIPTION_QOS.durability assert test_subscription_info.qos_profile.reliability == \ TEST_TOPIC_SUBSCRIPTION_QOS.reliability + assert test_subscription_info.qos_profile.history == \ + TEST_TOPIC_SUBSCRIPTION_QOS.history + assert test_subscription_info.qos_profile.depth == \ + TEST_TOPIC_SUBSCRIPTION_QOS.depth def test_count_publishers(daemon_node):