Shut down context during init if logging config fails#2594
Merged
christophebedard merged 2 commits intorollingfrom Aug 5, 2024
Merged
Conversation
Member
Author
|
Not 100% sure if this is something we want to do, so I made this a draft, but it made sense to me. |
Collaborator
|
rclcpp/rclcpp/src/rclcpp/context.cpp Lines 220 to 227 in 45adf65 Before So I think your modification is reasonable. |
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Member
Author
|
Alright then, this is ready for review. I couldn't find a way to properly test this. I'm open to suggestions. |
fujitatomoya
approved these changes
Aug 3, 2024
Collaborator
fujitatomoya
left a comment
There was a problem hiding this comment.
makes sense to me.
btw, i happened to find the following context is not used for the test, maybe we should remove it?
rclcpp/rclcpp/test/rclcpp/test_utilities.cpp
Line 181 in c468967
We already do this clean-up if some other tasks below fail. Before: [ RUN ] TestUtilities.test_context_init_shutdown_fails [ERROR] [1722555370.075637014] [rclcpp]: rcl context unexpectedly not shutdown during cleanup [WARN] [1722555370.077175569] [rclcpp]: logging was initialized more than once [ OK ] TestUtilities.test_context_init_shutdown_fails (3 ms) After: [ RUN ] TestUtilities.test_context_init_shutdown_fails [WARN] [1722555108.693207861] [rclcpp]: logging was initialized more than once [ OK ] TestUtilities.test_context_init_shutdown_fails (3 ms) Also, remove an unnecessary line in `test_utilities`. Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
922e999 to
1a91601
Compare
Member
Author
|
Yeah, I don't think it's necessary. Removed. |
Member
Author
clalancette
approved these changes
Aug 5, 2024
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.
We already do this clean-up if some other tasks below fail.
Before:
After: