-
Notifications
You must be signed in to change notification settings - Fork 91
Add option to specify the QoS profile in WaitForTopics
#493
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
Add option to specify the QoS profile in WaitForTopics
#493
Conversation
2a61e63 to
9ca2014
Compare
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.
9ca2014 to
4100080
Compare
christophebedard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, sorry for the delay
|
Pulls: #493 |
|
Finally, CI is green! |
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.
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.
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
WaitForTopicsclass 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