[Flaky Test] Microsoft.Build.UnitTests.TaskEnvironment_Tests.TaskEnvironment_SetEnvironment_ShouldReplaceAllVariables
- 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
flaky-test-id: Microsoft.Build.UnitTests.TaskEnvironment_Tests.TaskEnvironment_SetEnvironment_ShouldReplaceAllVariables
```
## Evidence
- **Assembly**: `Microsoft.Build.Engine.UnitTests`
- **Fully-qualified name**: `Microsoft.Build.UnitTests.TaskEnvironment_Tests.TaskEnvironment_SetEnvironment_ShouldReplaceAllVariables`
- **Distinct sources**: 3 rolling builds (0 PRs)
- **Rolling build IDs**: [1514373](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1514373), [1517682](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1517682), [1527742](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1527742)
- **Affected legs**: CoreOnLinux
- **TFMs**: net10.0, net11.0
- **First seen**: 2026-07-17
- **Last seen**: 2026-07-27
The test fails intermittently as a **test method cleanup failure**, observed in both `environmentType: "Multithreaded"` and `environmentType: "Stub"` variants across 3 independent rolling main builds over 10 days.
## Quarantine plan
This test will be quarantined via `[ActiveIssue("")]` (from `Microsoft.DotNet.XUnitV3Extensions`, namespace `Xunit`) until the underlying non-determinism is fixed. The quarantine pipeline (def 344) will continue collecting signal.
> [!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/30358735168) · sonnet46 · 119.8 AIC · ⌖ 6.34 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 in the Microsoft.Build.Engine.UnitTests assembly and run the test on the CoreOnLinux leg for net10.0 and net11.0. Compare the Multithreaded and Stub variants, focusing on the intermittent cleanup failure; done means the test no longer fails intermittently and can leave quarantine.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100