Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [Flaky test]: CanceledTasksDoNotLogMSB4181 unit test is unreliable #9298

Closed
jrdodds opened this issue Oct 2, 2023 · 0 comments · Fixed by #9326
Closed

[Bug] [Flaky test]: CanceledTasksDoNotLogMSB4181 unit test is unreliable #9298

jrdodds opened this issue Oct 2, 2023 · 0 comments · Fixed by #9326
Assignees
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

Comments

@jrdodds
Copy link
Contributor

jrdodds commented Oct 2, 2023

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

@jrdodds jrdodds added bug needs-triage Have yet to determine what bucket this goes in. labels Oct 2, 2023
@AR-May AR-May added flaky-test Tests that have failed but passed on rerun. Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. Priority:2 Work that is important, but not critical for the release and removed needs-triage Have yet to determine what bucket this goes in. labels Oct 3, 2023
@GangWang01 GangWang01 self-assigned this Oct 8, 2023
@AR-May AR-May added the triaged label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants