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

fix(test): race condition for cancelled tests #15233

Merged
merged 23 commits into from
Aug 2, 2022

Conversation

nayeemrmn
Copy link
Collaborator

@nayeemrmn nayeemrmn commented Jul 18, 2022

Not for merging, debugging flaky test on windows fast ci
Resolves issue in #15231.

@nayeemrmn nayeemrmn marked this pull request as draft July 18, 2022 16:41
@nayeemrmn
Copy link
Collaborator Author

@dsherret I figured out where the race condition was, it was this code:

for desc in tests.read().values() {
which wrongly assumes the registration events for the relevant tests have been received, when it is only guaranteed that they have been sent. So sometimes those tests wouldn't be present in tests yet.

I've moved that behaviour to the receiving side where it belongs. Now it can be reliably checked that the sending code has no dependency on the receiver state.

@nayeemrmn nayeemrmn changed the title try debug uncaught_errors test fix(test): race condition for cancelled tests Jul 27, 2022
@nayeemrmn nayeemrmn marked this pull request as ready for review July 27, 2022 17:01
@bartlomieju
Copy link
Member

@dsherret please take a look

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @nayeemrmn!

@dsherret dsherret merged commit 2e2c623 into denoland:main Aug 2, 2022
@nayeemrmn nayeemrmn deleted the try-debug-uncaught-errors branch August 2, 2022 15:09
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.

None yet

3 participants