Repository navigation
Allow slow Windows test probes to finish on loaded agents - #12565
Amaury Levé (Evangelink) merged 1 commit into
Conversation
Bound process exit and both redirected streams together without extending the cleanup deadline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 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
|
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 (
|
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, andinvalid-jsoncases ofBuildAsync_InformationalInvalidAndToolModesPreserveExitAndLazyFrameworktimed 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; builtnet462,net10.0, andnet11.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.trxandartifacts\TestResults\probe-fix\net11.0.trx.The full
net462run exercised 4,106 tests. The seven affected rows passed onnet462,net10.0, andnet11.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(parent6c7786339e675c5a85971cde4ce883846f408946). 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
helplaunch after approximately 30 seconds. With the fix, the same delayedhelpprobe completed in approximately 47 seconds and returnedresult:0,framework-created:0,capability-initialized:1, andtool-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 inartifacts\TestResults\probe-fix.