[Flaky Test] Microsoft.Build.UnitTests.TaskEnvironment_Tests.TaskEnvironment_SetEnvironment_ShouldReplaceAllVariables (Multithreaded) - Test [Content truncated due to length]
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
**Flaky-test key** (automated de-duplication — do not edit):
```text
[Test Method Cleanup Failure (Microsoft.Build.UnitTests.TaskEnvironment_Tests.TaskEnvironment_SetEnvironment_ShouldReplaceAllVariables(environmentType: "Multithreaded"))]
```
## Summary
The test method cleanup for `Microsoft.Build.UnitTests.TaskEnvironment_Tests.TaskEnvironment_SetEnvironment_ShouldReplaceAllVariables` (environmentType: `Multithreaded`) is intermittently failing in CI as a **test cleanup failure** on Linux.
## Evidence
- **Distinct sources:** 3 independent rolling builds on `main`
- **Affected leg:** CoreOnLinux
- **TFMs:** net10.0, net11.0
- **Assembly:** Microsoft.Build.Engine.UnitTests
- **First seen:** 2026-07-20 | **Last seen:** 2026-07-30
- **Rolling build IDs:** [1517682](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1517682), [1527742](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1527742), [1532844](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1532844)
## Notes
This is a **test cleanup failure** (not the test body itself). The cleanup is leaving the environment in a bad state on Linux. The test will be investigated and quarantined once this issue is open (next automated run).
> [!WARNING]
>
> Firewall blocked 2 domains
>
> The following domains were blocked by the firewall during workflow execution:
>
> - `awmgmcpg`
> - `southcentralus0.in.applicationinsights.azure.com`
>> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "awmgmcpg"
> - "southcentralus0.in.applicationinsights.azure.com"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>
> Generated by [Flaky Test Triage](https://github.com/dotnet/msbuild/actions/runs/30699098303) · sonnet46 · 128.5 AIC · ⌖ 4.9 AIC · ⊞ 14.7K · [◷](https://github.com/search?q=repo%3Adotnet%2Fmsbuild+is%3Aissue+%22gh-aw-workflow-call-id%3A+dotnet%2Fmsbuild%2Fflaky-test-detector.agent%22&type=issues)
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate Microsoft.Build.UnitTests.TaskEnvironment_Tests.TaskEnvironment_SetEnvironment_ShouldReplaceAllVariables and start by running or reviewing its Multithreaded case on the CoreOnLinux configuration. Inspect the test cleanup path for environment restoration; done means the cleanup no longer leaves Linux in a bad state and the affected test passes reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100