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

test_node_names is with a silent bug #8

Open
caioaamaral opened this issue Apr 5, 2021 · 0 comments
Open

test_node_names is with a silent bug #8

caioaamaral opened this issue Apr 5, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@caioaamaral
Copy link

Here we are filtering a launch entity of type rclpy.node.Node, but I think it should be launch_ros.actions.Node instead

lambda entity: isinstance(entity, rclpy.node.Node),

Some lines further we try to use launch_ros.actions.Node methods with a supposed rclpy.node.Node object:

self.assertTrue(node.is_node_name_fully_specified())

So far we had no error here probably because nodes is an empty list since there is no launch entity of type rclpy.node.Node, and then no assertion is made:

nodes = set(
            filter(
                lambda entity: isinstance(entity, rclpy.node.Node),
                spawn_launch.get_sub_entities()[0].entities
            )
        )
.....
for node in nodes:
            proc_info.assertWaitForStartup(node, timeout=5)
            self.assertTrue(node.is_node_name_fully_specified())
            self.assertRegex(node.node_name, combined_regex)

Then we must also add an extra assertion to make sure nodes is not empty (or just make sure it is the same size as expected_nodes)

@caioaamaral caioaamaral added the bug Something isn't working label Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant