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

Made test of cancellation of engine execution more robust #1984

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

tomatosalat0
Copy link
Contributor

Found a flaky test in #1983 . This PR makes this one test more robust (fixes a race condition).

The test will now be green, no matter when the provided ThreadPool.QueueUserWorkItem will get executed. This has been simulated by adding Thread.Sleep(10000) everywhere within the threadPoolAction locally. Without the adjustments, the sleep additions would break the tests.

Copy link
Collaborator

@lahma lahma left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to investigate, this test case has been a real PITA.

@lahma lahma enabled auto-merge (squash) October 24, 2024 05:42
@lahma lahma merged commit af0845f into sebastienros:main Oct 24, 2024
3 checks passed
@tomatosalat0 tomatosalat0 deleted the fix-flaky-test branch October 24, 2024 07:30
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.

3 participants