Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Skip CLI tests on Windows until we resolve the blocking/hanging isuse. (#489)" #583

Open
wants to merge 6 commits into
base: rolling
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions ros2action/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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=[
Expand All @@ -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=[
Expand All @@ -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=[
Expand All @@ -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=[
Expand Down
8 changes: 0 additions & 8 deletions ros2interface/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
9 changes: 0 additions & 9 deletions ros2lifecycle/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import contextlib
import sys
import unittest

from launch import LaunchDescription
Expand All @@ -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',
Expand Down
8 changes: 0 additions & 8 deletions ros2node/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 0 additions & 8 deletions ros2node/test/test_cli_duplicate_node_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
7 changes: 0 additions & 7 deletions ros2param/test/test_verb_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
7 changes: 0 additions & 7 deletions ros2param/test/test_verb_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
9 changes: 0 additions & 9 deletions ros2pkg/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import contextlib
import os
import sys
import tempfile
import unittest
import xml.etree.ElementTree as ET
Expand All @@ -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'
Expand Down
8 changes: 0 additions & 8 deletions ros2service/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
14 changes: 3 additions & 11 deletions ros2topic/test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)
9 changes: 0 additions & 9 deletions ros2topic/test/test_echo_pub.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import functools
import sys
import unittest

from launch import LaunchDescription
Expand All @@ -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'

Expand Down