[Bug] [Flaky test]: CanceledTasksDoNotLogMSB4181 unit test is unreliable #9298
Labels
Area: Our Own Build
Problems affecting the build or build infrastructure of the MSBuild repo itself.
bug
flaky-test
Tests that have failed but passed on rerun.
Priority:2
Work that is important, but not critical for the release
triaged
Issue Description
Unit test
Microsoft.Build.UnitTests.BackEnd.TaskBuilder_Tests.CanceledTasksDoNotLogMSB4181
failed on a PR build.The test includes a
Thread.Sleep
call.Steps to Reproduce
The issue was found when running the set of unit tests during a PR build but it appears to be a threading race condition and the test doesn't consistently break.
Expected Behavior
The test should pass for the PR build where it failed.
Actual Behavior
The test failed for Windows Core while passing for the other type of builds within the PR build.
Analysis
Related to:
#9277
#9100
A search in the repo shows that
Thread.Sleep
appears 163 times in 32 files. About 22 of the files appear to be unit tests or test support.Versions & Configurations
No response
The text was updated successfully, but these errors were encountered: