Skip to content

Allow slow Windows test probes to finish on loaded agents - #12565

Merged
Amaury Levé (Evangelink) merged 1 commit into
microsoft:mainfrom
Evangelink:dev/amauryleve/pipeline-test-failures-db9
Nov 23, 2026
Merged

Amaury Levé (Evangelink) merged 1 commit into
microsoft:mainfrom
Evangelink:dev/amauryleve/pipeline-test-failures-db9

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Pull request

Summary

Adjust the Microsoft.Testing.Platform unit-test child-process harness so slow Windows/.NET Framework child probes are not treated as hung after 30 seconds. In Pipelines - Run 20261120.2, the help, info, and invalid-json cases of BuildAsync_InformationalInvalidAndToolModesPreserveExitAndLazyFramework timed out while waiting for the child process, before reaching their assertions. The child execution/output-drain deadline is now two minutes; the separate cleanup deadline remains 30 seconds. No production code, assertions, retry settings, or test parallelization changed. No related GitHub issue; the failure is tracked by the linked pipeline run.

Design and decision record

No separate design record is needed for this narrowly scoped test-harness timeout correction. The execution timeout is separate from cleanup so slow startup does not weaken the bounded cleanup behavior.

Demonstration

A screenshot or UI demonstration is not applicable to this test-harness-only change. The focused run and full test results are listed below.

Validation and regression proof

Commands were run on Windows from dev/amauryleve/pipeline-test-failures-db9, at the fixed source revision. The Release build completed with 0 warnings and 0 errors.

  • .\eng\build.ps1 -build -configuration Release -projects 'test\UnitTests\Microsoft.Testing.Platform.UnitTests\Microsoft.Testing.Platform.UnitTests.csproj' -msbuildEngine dotnet -binaryLog -verbosity quiet — passed; built net462, net10.0, and net11.0.
  • $exe='artifacts\bin\Microsoft.Testing.Platform.UnitTests\Release\net462\Microsoft.Testing.Platform.UnitTests.exe'; & $exe --report-trx --report-trx-filename net462.trx --results-directory (Join-Path $PWD 'artifacts\TestResults\probe-fix') --progress off --output Minimal — passed: 4,104 passed, 0 failed, 2 skipped (4,106 total). TRX: artifacts\TestResults\probe-fix\net462.trx.
  • foreach ($f in 'net10.0','net11.0') { & .\.dotnet\dotnet.exe test --project test\UnitTests\Microsoft.Testing.Platform.UnitTests\Microsoft.Testing.Platform.UnitTests.csproj --framework $f --configuration Release --no-build --filter 'FullyQualifiedName~BuildAsync_InformationalInvalidAndToolModesPreserveExitAndLazyFramework' --report-trx --report-trx-filename "$f.trx" --results-directory (Join-Path $PWD 'artifacts\TestResults\probe-fix') } — passed for both TFMs, 7 passed, 0 failed, 0 skipped each. TRX: artifacts\TestResults\probe-fix\net10.0.trx and artifacts\TestResults\probe-fix\net11.0.trx.

The full net462 run exercised 4,106 tests. The seven affected rows passed on net462, net10.0, and net11.0. Azure test results for the failed CI run showed exactly three failed rows; Azure CI was not rerun.

Test-value evidence

Tested revision: 642f75b5745fe1c04c771b7bb7e69dbfd2fa59de (parent 6c7786339e675c5a85971cde4ce883846f408946). Contract: slow child execution and redirected-output draining should complete within the test watchdog; truly stuck children must still be terminated and joined.

Counterfactual and result: an isolated driver using the pre-fix helper timed out on a controlled 35-second delayed help launch after approximately 30 seconds. With the fix, the same delayed help probe completed in approximately 47 seconds and returned result:0, framework-created:0, capability-initialized:1, and tool-called:0. A blocked-child probe timed out at the two-minute execution limit and verified the child exited. This is executed, targeted counterfactual evidence; the affected rows also pass in the full and focused runs above. Local test artifacts are in artifacts\TestResults\probe-fix.

Bound process exit and both redirected streams together without extending the cleanup deadline.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 16:54
@github-actions github-actions Bot added the state/needs-review Awaiting review from the team. label Nov 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the child-probe timeout adjustment.

No open issues 🎉

What changed in this PR

This PR gives Microsoft.Testing.Platform unit-test child probes more time to finish on loaded Windows agents without extending the cleanup deadline.

Changes:

  • Raises the child execution timeout from 30 seconds to two minutes.
  • Applies that deadline to process exit and both redirected-output readers.
  • Reuses the combined completion task during cleanup, retaining its 30-second limit.

Test-value evidence: For revision 642f75b5745fe1c04c771b7bb7e69dbfd2fa59de, the PR reports a delayed-probe failure before the fix, success afterward, and termination of a blocked child. It also reports passing .NET Framework and focused modern .NET runs. Execution artifacts were not independently verified here.

File Description
test/​UnitTests/​Microsoft.Testing.Platform.UnitTests/​Helpers/​SystemWrappersTests.cs Separates execution and cleanup deadlines and bounds process exit plus output draining together.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Final test-triage resolution — Azure Pipelines build 1692422

Result: inconclusive. No test-product defect is identified, and no issue is warranted. The evidence is incomplete (evidenceIncomplete=true, 1 artifact download failure), so this is not a clean bill of health.

  • Failed leg: Windows BuildXL repository build Release, task Run unit tests (PowerShell exit code 1). The collected reports contain no matching failed test record for that leg, so I cannot attribute the failure to a specific test. It may be a build or infrastructure failure, which is outside this analysis (Build Failure Analysis owns those).

  • Failed results in the reports: all 8 come from Windows_App_Model_Diagnostics_Attempt1. They are fixtures that deliberately fail, so they are not product regressions:

    • NativeTests.Outcome ("expected host failure")
    • RetryFailsFirstAttempt ("deliberately fails the first retry attempt")
    • RetryTestMethod_PassesOnSecondAppContainerHost
    • 2 UWP DeploymentItemAttribute is not supported tests
  • Crash/hang: no diagnostics. Slowness: no regressions (0 of 28 candidates).

  • Confidence: low to medium. There is no durable-issue evidence.

  • Next step: open the Windows BuildXL Run unit tests log (log id 63) to find the real failure. If the same leg fails on other commits, re-run triage.

🤖 Automated content by GitHub Copilot. Generated by the Pipeline Test Triage workflow. · copilot · auto (Claude Sonnet 5.5) · ~26 AIC · ⌖ ~1 AIC · ⊞ 11K

@Evangelink
Amaury Levé (Evangelink) merged commit 60ec2e6 into microsoft:main Nov 23, 2026
28 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/pipeline-test-failures-db9 branch November 23, 2026 09:40
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Nov 23, 2026
@github-actions github-actions Bot removed the state/needs-review Awaiting review from the team. label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants