This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Limit ReadAsyncCompletesIfFlushAsyncCanceledMidFlush iteration count#31653
Merged
joshfree merged 1 commit intodotnet:masterfrom Aug 8, 2018
Merged
Limit ReadAsyncCompletesIfFlushAsyncCanceledMidFlush iteration count#31653joshfree merged 1 commit intodotnet:masterfrom
joshfree merged 1 commit intodotnet:masterfrom
Conversation
joshfree
approved these changes
Aug 8, 2018
| while (cancellations < 20) | ||
| // We are limiting iteration count because on slower machines we are not able to | ||
| // reproduce race conditions enough times during the test | ||
| while (cancellations < 20 && iterations < 2000000) |
Member
There was a problem hiding this comment.
nit: please write the literal as 2_000_000
877c1a6 to
20d75bd
Compare
joshfree
approved these changes
Aug 8, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/dotnet/coreclr/issues/19295
I was able to repro the issue by limiting my CPU to 20% and assigning the test process to a single core.
Limiting the iteration count helps.
I would never write a test for race condition ever again 😞