Add delay after node creation to ensure discovery for other rmw implementations#168
Add delay after node creation to ensure discovery for other rmw implementations#168
Conversation
…mentations Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
|
I was checking your suggestion @hidmic, but sometimes the test fails, even with my changes. Since we have to make retries and specify longer timeouts for |
sros2/test/sros2/commands/security/verbs/test_generate_policy.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
64f30c9 to
6aba460
Compare
|
I changed the test to start using launch_testing instead, take a look whenever you can @jacobperron , @hidmic |
jacobperron
left a comment
There was a problem hiding this comment.
One comment below, otherwise LGTM
| from ros2cli import cli | ||
|
|
||
|
|
||
| def test_generate_policy_no_nodes(capsys): |
There was a problem hiding this comment.
I'm not sure that this PR resolves the previous test failure on Windows (#143).
We probably still want to keep the TODO and skip decorator. Note, to reproduce the failure, you should also run tests for packages other than sros2 (e.g. colcon test --packages-select demo_nodes_cpp && colcon test --packages-select sros2).
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
sros2/test/sros2/commands/security/verbs/fixtures/pub_sub_node.py
Outdated
Show resolved
Hide resolved
sros2/test/sros2/commands/security/verbs/fixtures/client_service_node.py
Outdated
Show resolved
Hide resolved
sros2/test/sros2/commands/security/verbs/test_generate_policy.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
|
Re-runing CI up to |
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
|
Rebased, refactored and used as a basis for #214. Closing. |
For connext, there were two issues:
When the
clicommand is run,sros2/sros2/test/sros2/commands/security/verbs/test_generate_policy.py
Lines 41 to 42 in c7ae64e
it runs in another thread/context, ending up here:
sros2/sros2/sros2/verb/generate_policy.py
Line 130 in c7ae64e
The culprit here, is the next portion of code:
https://github.com/ros2/rmw_connext/blob/b1062f92bfbec2e85be3083144a0f6c5a599287d/rmw_connext_shared_cpp/src/node_info_and_types.cpp#L104-L139
get_discovered_participantsfrom connext is returning 0 handlers, concluding that connext is not finding the previously created node in python.A timer is not ideal, but for testing purposes I see no other way to ensure the node's advertising.