Skip to content

Conversation

LastStarDust
Copy link
Contributor

@LastStarDust LastStarDust commented Oct 1, 2025

Description

During my tests, I noticed that explicitly setting the QoS profile made a big difference in terms of reproducibility and flakiness.

Before, it would happen that integration tests using the WaitForTopics class would randomly fail with timeout errors, probably due to messages not being received by a subscriber. During integration tests where the input and output of a node are cross-checked for consistency, even the loss of a single message can make the test fail which may be unacceptable, for example, in CI workflows that require 100% repeatability.

In particular, enforcing QoS policy reliability to “RELIABLE” and QoS policy durability to “TRANSIENT_LOCAL” decreased the chances of tests randomly failing by orders of magnitude.

This is expected, since these options help ensure that all messages are received. Otherwise, in the case of network or other transient issues, a message might get lost, causing the integration test to fail.


Did you use Generative AI?

No


Additional Information

It would be nice if this is backported to Jazzy

@LastStarDust LastStarDust force-pushed the feature/wait-for-topics-qos branch 3 times, most recently from 2a61e63 to 9ca2014 Compare October 1, 2025 04:48
@LastStarDust LastStarDust marked this pull request as ready for review October 1, 2025 04:53
Signed-off-by: Giorgio Pintaudi <[email protected]>

When testing subscribers and  publishers, usually we do not want to miss any message due to race issues or other network instabilities. So we give the option to the user to specify a QoS profile best suited for the test scenario. The default is to set the durability to transient local, so that the publisher do not drop any packages in case of late joining subscribers.
@LastStarDust LastStarDust force-pushed the feature/wait-for-topics-qos branch from 9ca2014 to 4100080 Compare October 1, 2025 05:09
@christophebedard christophebedard self-requested a review October 16, 2025 17:26
@christophebedard christophebedard self-assigned this Oct 16, 2025
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