Open
Skip CooperativeBlockingCanCreateThreadsFaster on Debug runtimes#131834
Conversation
|
Azure Pipelines: 16 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: VSadov <8218165+VSadov@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix ThreadPoolTests.CooperativeBlockingCanCreateThreadsFaster failure on Windows
Skip CooperativeBlockingCanCreateThreadsFaster on Debug runtimes
Aug 4, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/libraries/System.Threading.ThreadPool/tests/ThreadPoolTests.cs:1506
PlatformDetectionalready providesSlowRuntimeTimeoutModifierspecifically for tests that time out on Debug/Checked runtimes (seePlatformDetection.SlowRuntimeTimeoutModifier). Skipping the test entirely on Debug reduces coverage and may mask debug-only issues; consider instead scaling theWaitOnetimeout bySlowRuntimeTimeoutModifier(or otherwise using that helper) so the test can still run on slower runtimes, unless there’s a strong reason to avoid lengthening Debug CI runs.
// Timing-sensitive tests can be too flaky on a Debug runtime, which is much slower
public static bool IsThreadingAndRemoteExecutorSupportedAndNotDebugRuntime =>
IsThreadingAndRemoteExecutorSupported && !PlatformDetection.IsDebugRuntime;
Member
|
@eduardo-vp - a test only change blocking a test on Debug corelib. I do not think the PR will fail, since the failure is fairly rare. We can merge and see if it still reproduces. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @VSadov |
VSadov
marked this pull request as ready for review
August 4, 2026 22:41
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
eduardo-vp
approved these changes
Aug 4, 2026
VSadov
enabled auto-merge (squash)
August 4, 2026 23:37
This was referenced Aug 5, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ThreadPoolTests.CooperativeBlockingCanCreateThreadsFasteris timing-sensitive and has been failing intermittently in CI. Every observed failure was in a Debug configuration, where the runtime is slow enough that the test's timing assumptions no longer hold — consistent with the historical investigation in #66765, which attributed failures to timeouts under concurrent load.Changes
IsThreadingAndRemoteExecutorSupportedAndNotDebugRuntimetoThreadPoolTests, combining the existing condition with!PlatformDetection.IsDebugRuntime.ConditionalFactonCooperativeBlockingCanCreateThreadsFasterto use it, so the test still runs in Release/Checked and is skipped on Debug.Test-only change; no product code is affected.