You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consolidates #905 and #906. The shared root cause: a unit test depends on environment state it does not control, so its result depends on scheduling or on other processes rather than on the code under test.
QuickFiler.Test/Viewers/ItemViewerBreadcrumbThreadAffinityTests.cs:332. The file is 490 lines, so the fix requires a split to stay under 500.
Candidates to triage:
BreadcrumbSelectorToggleUiBoundaryTests.cs:75
BreadcrumbPopupControlDispatchTests.cs:29,111
BreadcrumbPopupBoundaryCoverageTests.cs:58
BreadcrumbPopupBoundaryCoverageTests.Part2.cs:192
BreadcrumbUiThreadDispatchTests.cs:90,301
Task.Run(() => tcs.SetResult(...)) calls that only complete a task are not affected.
Bug: Bug: FileInfoWrapper_Tests.OpenRead opens the repository's own TaskMaster.sln #906:UtilitiesCS.Test/HelperClasses/FileInfoWrapper_Tests.cs:56-62 opens the repository's own TaskMaster.sln, found by GetSolutionFile() at lines 340-352, as a fixture. Resident MSBuild node-reuse workers can hold that file open, so the outcome depends on build history.
Environment
OS/version: Windows 11 Pro 10.0.26200
Python version: not applicable (C#, MSTest, net48)
Summary
Consolidates #905 and #906. The shared root cause: a unit test depends on environment state it does not control, so its result depends on scheduling or on other processes rather than on the code under test.
Task.Runas the "other thread".Task.Runguarantees only a thread-pool thread, never a different one, so under parallel execution the guard under test can go unexercised. PR fix(quickfiler): run breadcrumb thread-affinity worker tests on a dedicated thread #904 (Bug: Bug: Breadcrumb thread-affinity tests assume Task.Run yields a distinct thread #900) fixed two instances. Remaining:QuickFiler.Test/Viewers/ItemViewerBreadcrumbThreadAffinityTests.cs:332. The file is 490 lines, so the fix requires a split to stay under 500.BreadcrumbSelectorToggleUiBoundaryTests.cs:75BreadcrumbPopupControlDispatchTests.cs:29,111BreadcrumbPopupBoundaryCoverageTests.cs:58BreadcrumbPopupBoundaryCoverageTests.Part2.cs:192BreadcrumbUiThreadDispatchTests.cs:90,301Task.Run(() => tcs.SetResult(...))calls that only complete a task are not affected.UtilitiesCS.Test/HelperClasses/FileInfoWrapper_Tests.cs:56-62opens the repository's ownTaskMaster.sln, found byGetSolutionFile()at lines 340-352, as a fixture. Resident MSBuild node-reuse workers can hold that file open, so the outcome depends on build history.Environment
/Settings:TaskMaster.runsettings(Workers 0, Scope ClassLevel)mainat177b6d78eSteps to Reproduce
Task.Runsites and confirm that each asserts a thread-identity property against the thread it obtained.FileInfoWrapper_Tests.GetSolutionFile()and confirm it resolves the repository's own solution file.Expected Behavior
Threadthat is joined, and asserts inside that thread that it is distinct (for exampleCheckAccess() == false) before exercising the guard. This is the Bug: Bug: Breadcrumb thread-affinity tests assume Task.Run yields a distinct thread #900 pattern.Actual Behavior
The guard under test can pass without being exercised, and the file-open test can fail or pass depending on MSBuild worker residency.
Logs / Screenshots
Impact / Severity
Source
From: docs/features/potential/2026-09-28-tests-depend-on-uncontrolled-environment.md