Issue Description
Unit test Microsoft.Build.UnitTests.BackEnd.TaskBuilder_Tests.CanceledTasksDoNotLogMSB4181 failed on a PR build.
Shouldly.ShouldAssertException : logger.WarningCount
should be
1
but was
0
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
Issue Description
Unit test
Microsoft.Build.UnitTests.BackEnd.TaskBuilder_Tests.CanceledTasksDoNotLogMSB4181failed on a PR build.The test includes a
Thread.Sleepcall.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.Sleepappears 163 times in 32 files. About 22 of the files appear to be unit tests or test support.Versions & Configurations
No response