diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-11-25 14:59:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-25 14:59:04 +0300 |
commit | 031405e9cc528631cee5bfa1e6f7b0fb54d47ada (patch) | |
tree | 253743db38f08b72aeb7ea6f197e71aa4001fe84 /mcs/class/Mono.Tasklets | |
parent | e8e92e5323c875b6709d03f212f43d29c1c2f523 (diff) |
[corlib] Fix flaky ThreadPoolTests.AsyncLocalCapture test (#6099)
The test was added in https://github.com/mono/mono/commit/375471820c02ff0bab025bff75b5da7efc95d3cd.
We were seeing some flakyness in the this test, looking at it I
noticed that we were passing executeOnlyOnce = false to
(Unsafe)RegisterWaitForSingleObject. This means that the delegate
would be executed again whenever the AutoResetEvent `evt` is signaled or
the timeout elapsed. The problem is that evt is never signaled by design
and we set a timeout of 1ms which means we'd execute it in a tight loop.
Setting executeOnlyOnce = true fixes this and I verified it doesn't
change the intent of the test (i.e. the test still fails after the
original commit is reverted).
Bumped the timeout for the CountdownEvent as well to be safe
since it's quite short.
Diffstat (limited to 'mcs/class/Mono.Tasklets')
0 files changed, 0 insertions, 0 deletions