Check that future is done, and always call rclpy.shutdown#273
Merged
Check that future is done, and always call rclpy.shutdown#273
Conversation
Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
ivanpauno
approved these changes
Oct 1, 2021
Contributor
Author
Contributor
Contributor
Contributor
|
@sloretz I think it's good to go 👍 |
Contributor
Author
|
Thank you @Blast545 for following up on this with CI! |
Contributor
|
👨🌾 This extra added assert failed in the windows release nightlies: Can I ask you to take a look @sloretz? 🙏 |
Contributor
Author
Contributor
|
Oh, I see. Thanks for the context! |
Contributor
|
I don't think it's a flaky call, it has been failing constantly in the past 5 WIndows Release CI jobs. ci.ros2.org/nightly_win_rel#2090/. Can I ask you to take an extra look @sloretz ? |
This was referenced Oct 20, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This partially undoes #270 - I didn't realize
spin_until_future_complete()does nothing on timeout, so the future's result could be None. This assert's the future is done before using the result.The second commit Makes sure
rclpy.shutdown()is always called. It looks like all the tests are run in the same Python instance, so the tests need to be extra careful when initializing rclpy globally. Using atry/finallyconstruct makes sure rclpy will be shutdown for the next test. Otherwise, errors like this one can happen: https://ci.ros2.org/job/ci_windows/15536/consoleText