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

Fix logging lifecycles and clean up tests #6

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

mxgrey
Copy link

@mxgrey mxgrey commented Nov 2, 2024

This PR addresses two points of feedback:

  • Make sure that logging is only configured once and only fini-ed when all contexts are gone [1]
  • Use ENTITY_LIFECYCLE_MUTEX to protect against race conditions [2]

While making this PR I uncovered a fault in one of the tests which didn't show up because of the flawed teardown of logging: The empty graph tests should now show that a /rosout node exists and that it has one topic.

I also took the liberty of cleaning up the tests to make sure that each test creates a node with a unique name, because otherwise we get spammed with warnings which might mislead someone into thinking that something is wrong with rclrs or its tests.

Copy link
Owner

@geoff-imdex geoff-imdex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Appreciate the fix for the graph test - not sure why this didn't fail for me originally, but we started seeing it in some additional work we've been doing.

@geoff-imdex
Copy link
Owner

As with unboxed_logging, merging this in with the build failing to make it easier to spin up a new branch/pr to address.

@geoff-imdex geoff-imdex merged commit 09f5664 into geoff-imdex:main Nov 4, 2024
0 of 3 checks passed
@mxgrey mxgrey deleted the logging_lifecycle branch November 5, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants