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 flaky test, ensure job suspension where expected by the test #4204

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

zuevmaxim
Copy link
Contributor

Fixes #3596

@zuevmaxim zuevmaxim requested a review from qwwdfsad August 1, 2024 14:47
* `withContext(dispatcher2 + CoroutineName("dispatched"))`.
*
* Here this requirement is fulfilled by forcing execution on a single thread.
* However, dispatching is performed with two non-equal dispatchers to simulate multithreaded behavior.
Copy link
Member

Choose a reason for hiding this comment

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

You probably mean "to avoid dispatch short-circuit" instead of "simulate multithreaded behavior.", otherwise it's a bit confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually my goal was to keep force dispatching here: withContext(dispatcher2 + CoroutineName("dispatched")). If we use only one or two equal dispatchers, then there will be no dispatch at this point

@zuevmaxim zuevmaxim requested a review from qwwdfsad August 5, 2024 10:03
@qwwdfsad
Copy link
Member

Nice one debugging it!

@zuevmaxim zuevmaxim merged commit a7fe247 into develop Aug 12, 2024
1 check passed
@zuevmaxim zuevmaxim deleted the zuev/fix-flaky-context-test branch August 12, 2024 11:03
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