-
Notifications
You must be signed in to change notification settings - Fork 47
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
Do not use ros2cli daemon in generate_policy tests. #212
Conversation
Signed-off-by: Michel Hidalgo <[email protected]>
Yeah it's a trade-off, I considered removing it when it caused problems a few PRs ago but didn't do it for 2 reasons:
It's not clear to me that this change is a clear win overall. Maybe it's worth having some tests using it and some tests not using it to have coverage for both scenarios |
Codecov Report
@@ Coverage Diff @@
## master #212 +/- ##
=======================================
Coverage 77.95% 77.95%
=======================================
Files 16 16
Lines 576 576
Branches 52 52
=======================================
Hits 449 449
Misses 107 107
Partials 20 20
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
The alternative would be to explicitly stop an already running daemon at the beginning of the test (which we do in some other tests).
True, but the daemon doesn't really make things any better in this case i.e. where each test sets up a ROS graph of its own.
True, and I agree we can change this test to cover both cases. But I do see this patch as an improvement, as it avoids cross-talk between tests and ensures these run in a consistent manner.
Right, plus an explicit wait for that daemon to discover nodes instantiated within tests. |
For sure.
I think this is what we should do here, otherwise we remove test coverage for things we know broke the CLI and trading it for potential CI flakiness reduction. |
Fair enough. I'll mix and match #168 and this PR to test all RMW implementations, with and without a daemon. |
Alright, this has been superseded by #214. Let's continue the discussion there. |
Precisely what the title says. As it stands,
test_generate_policy.py
may fail because of discovery latencies, CLI daemon state spanning multiple tests and even using a non-matching RMW implementation. This circumvents that problem by simply not using it and providing 1 second for discovery to take place (which should be enough for Fast-RTPS at least).