Skip to content

Wait for the graph to settle in DroppingTheStreamUnsubscribes - #62

Merged
otamachan merged 2 commits into
otamachan:mainfrom
yukiendo-pfr:wait-for-graph-in-dropped-stream-test
Oct 16, 2026
Merged

otamachan merged 2 commits into
otamachan:mainfrom
yukiendo-pfr:wait-for-graph-in-dropped-stream-test

Conversation

@yukiendo-pfr

Copy link
Copy Markdown
Contributor

TopicStreamTest.DroppingTheStreamUnsubscribes (added in #61) checks count_subscribers() right after creating and after dropping the subscription. The graph is updated asynchronously, so the count can still be stale at that point, and the test fails intermittently under load:

test_topic_stream.cpp:223: Failure
Expected equality of these values:
  node_->count_subscribers("dropped_stream_topic")
    Which is: 0
  1u

The test now polls count_subscribers() until it reaches the expected value (up to 5 s) before asserting.

Running 16 instances in parallel (each in its own ROS_DOMAIN_ID) for 320 runs in total: 57 failures before, 0 after.

@yukiendo-pfr
yukiendo-pfr marked this pull request as ready for review October 16, 2026 03:01
@otamachan

Copy link
Copy Markdown
Owner

LGTM Thanks

@otamachan
otamachan merged commit 154b426 into otamachan:main Oct 16, 2026
6 checks passed
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