diff --git a/ros2action/test/test_cli.py b/ros2action/test/test_cli.py index 2d6c8d8c0..d502892ed 100644 --- a/ros2action/test/test_cli.py +++ b/ros2action/test/test_cli.py @@ -35,14 +35,6 @@ import yaml -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - @pytest.mark.rostest @launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations()) def generate_test_description(rmw_implementation): @@ -132,7 +124,8 @@ def launch_action_command(self, arguments): def test_info_on_nonexistent_action(self): with self.launch_action_command(arguments=['info', '/not_an_action']) as action_command: - assert action_command.wait_for_shutdown(timeout=10) + timeout = 20 if os.name == 'nt' else 10 # ros2 action info is slower on Windows + assert action_command.wait_for_shutdown(timeout=timeout) assert action_command.exit_code == launch_testing.asserts.EXIT_OK assert launch_testing.tools.expect_output( expected_lines=[ @@ -147,7 +140,8 @@ def test_info_on_nonexistent_action(self): @launch_testing.markers.retry_on_failure(times=5, delay=1) def test_fibonacci_info(self): with self.launch_action_command(arguments=['info', '/fibonacci']) as action_command: - assert action_command.wait_for_shutdown(timeout=10) + timeout = 20 if os.name == 'nt' else 10 # ros2 action info is slower on Windows + assert action_command.wait_for_shutdown(timeout=timeout) assert action_command.exit_code == launch_testing.asserts.EXIT_OK assert launch_testing.tools.expect_output( expected_lines=[ @@ -163,7 +157,8 @@ def test_fibonacci_info(self): @launch_testing.markers.retry_on_failure(times=5, delay=1) def test_fibonacci_info_with_types(self): with self.launch_action_command(arguments=['info', '-t', '/fibonacci']) as action_command: - assert action_command.wait_for_shutdown(timeout=10) + timeout = 20 if os.name == 'nt' else 10 # ros2 action info is slower on Windows + assert action_command.wait_for_shutdown(timeout=timeout) assert action_command.exit_code == launch_testing.asserts.EXIT_OK assert launch_testing.tools.expect_output( expected_lines=[ @@ -179,7 +174,8 @@ def test_fibonacci_info_with_types(self): @launch_testing.markers.retry_on_failure(times=5, delay=1) def test_fibonacci_info_count(self): with self.launch_action_command(arguments=['info', '-c', '/fibonacci']) as action_command: - assert action_command.wait_for_shutdown(timeout=10) + timeout = 20 if os.name == 'nt' else 10 # ros2 action info is slower on Windows + assert action_command.wait_for_shutdown(timeout=timeout) assert action_command.exit_code == launch_testing.asserts.EXIT_OK assert launch_testing.tools.expect_output( expected_lines=[ diff --git a/ros2interface/test/test_cli.py b/ros2interface/test/test_cli.py index 8f1c91c5b..9b75cae2a 100644 --- a/ros2interface/test/test_cli.py +++ b/ros2interface/test/test_cli.py @@ -30,14 +30,6 @@ import pytest -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - some_messages_from_test_msgs = [ 'test_msgs/msg/BasicTypes', 'test_msgs/msg/Constants', diff --git a/ros2lifecycle/test/test_cli.py b/ros2lifecycle/test/test_cli.py index c99c35f9b..bf5f55a8e 100644 --- a/ros2lifecycle/test/test_cli.py +++ b/ros2lifecycle/test/test_cli.py @@ -13,7 +13,6 @@ # limitations under the License. import contextlib -import sys import unittest from launch import LaunchDescription @@ -32,14 +31,6 @@ from rclpy.utilities import get_available_rmw_implementations -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - ALL_LIFECYCLE_NODE_TRANSITIONS = [ '- configure [1]', '\tStart: unconfigured', diff --git a/ros2node/test/test_cli.py b/ros2node/test/test_cli.py index 97f02ff4f..90daedd4c 100644 --- a/ros2node/test/test_cli.py +++ b/ros2node/test/test_cli.py @@ -36,14 +36,6 @@ from rclpy.utilities import get_available_rmw_implementations -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - @pytest.mark.rostest @launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations()) def generate_test_description(rmw_implementation): diff --git a/ros2node/test/test_cli_duplicate_node_names.py b/ros2node/test/test_cli_duplicate_node_names.py index 3a48cd350..540a7edb9 100644 --- a/ros2node/test/test_cli_duplicate_node_names.py +++ b/ros2node/test/test_cli_duplicate_node_names.py @@ -35,14 +35,6 @@ from ros2node.api import INFO_NONUNIQUE_WARNING_TEMPLATE -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - @pytest.mark.rostest @launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations()) def generate_test_description(rmw_implementation): diff --git a/ros2param/test/test_verb_dump.py b/ros2param/test/test_verb_dump.py index e1c72531b..79fc7b586 100644 --- a/ros2param/test/test_verb_dump.py +++ b/ros2param/test/test_verb_dump.py @@ -72,13 +72,6 @@ ' use_sim_time: false\n' ) -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - @pytest.mark.rostest @launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations()) diff --git a/ros2param/test/test_verb_load.py b/ros2param/test/test_verb_load.py index 0cfbbb43a..ac872a3b6 100644 --- a/ros2param/test/test_verb_load.py +++ b/ros2param/test/test_verb_load.py @@ -72,13 +72,6 @@ ' use_sim_time: false\n' ) -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - @pytest.mark.rostest @launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations()) diff --git a/ros2pkg/test/test_cli.py b/ros2pkg/test/test_cli.py index 244623174..8d4811ee6 100644 --- a/ros2pkg/test/test_cli.py +++ b/ros2pkg/test/test_cli.py @@ -14,7 +14,6 @@ import contextlib import os -import sys import tempfile import unittest import xml.etree.ElementTree as ET @@ -31,14 +30,6 @@ import pytest -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - some_cli_packages = [ 'ros2cli', 'ros2pkg' diff --git a/ros2service/test/test_cli.py b/ros2service/test/test_cli.py index cb9cb8a8e..371a805b7 100644 --- a/ros2service/test/test_cli.py +++ b/ros2service/test/test_cli.py @@ -38,14 +38,6 @@ from test_msgs.srv import BasicTypes -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - def get_echo_call_output(**kwargs): request = BasicTypes.Request() for field_name, field_value in kwargs.items(): diff --git a/ros2topic/test/test_cli.py b/ros2topic/test/test_cli.py index 7b361f0ce..601684b9e 100644 --- a/ros2topic/test/test_cli.py +++ b/ros2topic/test/test_cli.py @@ -37,14 +37,6 @@ from rclpy.utilities import get_available_rmw_implementations -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - @pytest.mark.rostest @launch_testing.parametrize('rmw_implementation', get_available_rmw_implementations()) def generate_test_description(rmw_implementation): @@ -716,7 +708,7 @@ def test_topic_delay(self): head_line = topic_command.output.splitlines()[0] average_delay = float(average_delay_line_pattern.match(head_line).group(1)) - assert math.isclose(average_delay, 0.0, abs_tol=10e-3) + assert math.isclose(average_delay, 0.0, abs_tol=0.1) @launch_testing.markers.retry_on_failure(times=5, delay=1) def test_topic_hz(self): @@ -767,8 +759,8 @@ def test_topic_bw(self): assert topic_command.wait_for_output(functools.partial( launch_testing.tools.expect_output, expected_lines=[ 'Subscribed to [/defaults]', - re.compile(r'\d{2} B/s from \d+ messages'), - re.compile(r'\s*Message size mean: \d{2} B min: \d{2} B max: \d{2} B') + re.compile(r'\d{2,3} B/s from \d+ messages'), + re.compile(r'\s*Message size mean: \d{2,3} B min: \d{2,3} B max: \d{2,3} B') ], strict=True ), timeout=10) assert topic_command.wait_for_shutdown(timeout=10) diff --git a/ros2topic/test/test_echo_pub.py b/ros2topic/test/test_echo_pub.py index 7f41b6d87..4b6d62c19 100644 --- a/ros2topic/test/test_echo_pub.py +++ b/ros2topic/test/test_echo_pub.py @@ -13,7 +13,6 @@ # limitations under the License. import functools -import sys import unittest from launch import LaunchDescription @@ -38,14 +37,6 @@ from std_msgs.msg import String -# Skip cli tests on Windows while they exhibit pathological behavior -# https://github.com/ros2/build_farmer/issues/248 -if sys.platform.startswith('win'): - pytest.skip( - 'CLI tests can block for a pathological amount of time on Windows.', - allow_module_level=True) - - TEST_NODE = 'cli_echo_pub_test_node' TEST_NAMESPACE = 'cli_echo_pub'