Skip to content

Fix flaky test: SimplePublisherTest#stochastic_onNext_multiProducerSeemsThreadSafe #4206

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

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

millems
Copy link
Contributor

@millems millems commented Jul 18, 2023

Before this change, a producer in the test would not wait for all other producers to finish sending their messages before calling complete(). Because a producer could end up calling complete() before the other publishers finished sending, the test would see those "trailing" messages after the complete() as having been dropped. To fix this, we now wait to call complete() until all producers have finished writing their messages.

…emsThreadSafe

Before this change, a producer in the test would not wait for all other producers to finish sending their messages before calling complete(). Because a producer could end up calling complete() before the other publishers finished sending, the test would see those "trailing" messages after the complete() as having been dropped. To fix this, we now wait to call complete() until all producers have finished writing their messages.
@millems millems requested a review from a team as a code owner July 18, 2023 23:16
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@millems millems merged commit c3dbef4 into master Jul 19, 2023
@debora-ito debora-ito linked an issue Jul 26, 2023 that may be closed by this pull request
@millems millems deleted the millem/fix-flaky-test branch February 5, 2024 20:50
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.

Unstable tests on master
2 participants