Skip to content

Commit 0c081a7

Browse files
authored
Increase the timeouts in wait_for_topic_launch_test. (#360)
Especially on a busy machine (and Windows), waiting only 2 seconds for 5 nodes and publishers to join a network and do discovery is too short. Increase this to 10 seconds, which should improve the reliability of this test. Signed-off-by: Chris Lalancette <[email protected]>
1 parent 1d57793 commit 0c081a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

launch_testing_ros/test/examples/wait_for_topic_launch_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ def test_topics_successful(self, count):
5959
expected_topics = {'chatter_' + str(i) for i in range(count)}
6060

6161
# Method 1 : Using the magic methods and 'with' keyword
62-
with WaitForTopics(topic_list, timeout=2.0) as wait_for_node_object_1:
62+
with WaitForTopics(topic_list, timeout=10.0) as wait_for_node_object_1:
6363
assert wait_for_node_object_1.topics_received() == expected_topics
6464
assert wait_for_node_object_1.topics_not_received() == set()
6565

6666
# Multiple instances of WaitForNode() can be created safely as
6767
# their internal nodes spin in separate contexts
6868
# Method 2 : Manually calling wait() and shutdown()
69-
wait_for_node_object_2 = WaitForTopics(topic_list, timeout=2.0)
69+
wait_for_node_object_2 = WaitForTopics(topic_list, timeout=10.0)
7070
assert wait_for_node_object_2.wait()
7171
assert wait_for_node_object_2.topics_received() == expected_topics
7272
assert wait_for_node_object_2.topics_not_received() == set()

0 commit comments

Comments
 (0)