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

test_graph_empty is flaky #426

Open
mxgrey opened this issue Nov 5, 2024 · 0 comments
Open

test_graph_empty is flaky #426

mxgrey opened this issue Nov 5, 2024 · 0 comments
Assignees

Comments

@mxgrey
Copy link
Collaborator

mxgrey commented Nov 5, 2024

I've noticed that once in a while test_graph_empty in graph.rs will have a failed assertion here where rclrs only detects 5 services instead of the expected 6.

I believe this is most likely a race condition in discovery where most of the time service discovery is finished by the time we query for the services, but that's not guaranteed because the underlying rmw implementation is usually multi-threaded.

In #421 I introduce a notify_on_graph_change function which can be used in conjunction with until_promise_resolved to spin until the node graph satisfies some condition. I recommend that we use this combo to keep spinning until the number of services reaches the expected value. That should eliminate all flakiness, assuming this really is just a multi-threaded discovery problem.

I'm opening this issue just to remind myself to fix this test once #421 is merged. If a maintainer can assign the issue to me, I would appreciate it.

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

No branches or pull requests

1 participant