Skip to content
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
pakrym:pakrym/limit-test-iterations
Aug 8, 2018
Merged

Limit ReadAsyncCompletesIfFlushAsyncCanceledMidFlush iteration count#31653
joshfree merged 1 commit intodotnet:masterfrom
pakrym:pakrym/limit-test-iterations

Conversation

@pakrym
Copy link

@pakrym pakrym commented Aug 8, 2018

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 😞

@pakrym pakrym requested a review from ahsonkhan August 8, 2018 16:36
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)
Copy link
Member

Choose a reason for hiding this comment

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

nit: please write the literal as 2_000_000

@joshfree joshfree added test bug Problem in test source code (most likely) area-System.IO.Pipelines labels Aug 8, 2018
@pakrym pakrym force-pushed the pakrym/limit-test-iterations branch from 877c1a6 to 20d75bd Compare August 8, 2018 16:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.IO.Pipelines test bug Problem in test source code (most likely)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants