From d9fbc1b9dc1f27fd5a6afcec9b681290c7b93710 Mon Sep 17 00:00:00 2001 From: Pintaudi Giorgio Date: Mon, 13 Mar 2023 11:46:34 +0900 Subject: [PATCH] check the buffer length --- launch_testing_ros/test/examples/wait_for_topic_launch_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/launch_testing_ros/test/examples/wait_for_topic_launch_test.py b/launch_testing_ros/test/examples/wait_for_topic_launch_test.py index ab8d30a9..58eb0eab 100644 --- a/launch_testing_ros/test/examples/wait_for_topic_launch_test.py +++ b/launch_testing_ros/test/examples/wait_for_topic_launch_test.py @@ -68,6 +68,7 @@ def test_topics_successful(self, count): assert wait_for_node_object_1.topics_received() == expected_topics assert wait_for_node_object_1.topics_not_received() == set() for topic_name, _ in topic_list: + assert len(wait_for_node_object_1.received_messages(topic_name)) >= 1 message = wait_for_node_object_1.received_messages(topic_name).pop().data assert message_pattern.match(message) @@ -79,6 +80,7 @@ def test_topics_successful(self, count): assert wait_for_node_object_2.topics_received() == expected_topics assert wait_for_node_object_2.topics_not_received() == set() for topic_name, _ in topic_list: + assert len(wait_for_node_object_1.received_messages(topic_name)) >= 1 message = wait_for_node_object_2.received_messages(topic_name).pop().data assert message_pattern.match(message) wait_for_node_object_2.shutdown()