Repository navigation
test: stabilise CI tests that fail under load or on Windows checkouts - #7882
Conversation
- Template tests: check template snapshots out with LF and treat .razor and .http as text, so the Windows release and workflow_dispatch runs pass. - RPC tests: start the built test host directly instead of through `dotnet run`, and give its connection and initialize steps three minutes. - Aspire crash-probe tests: raise ResourceTimeout to five minutes. The fixture fails as soon as the probe exits, so this only bounds a hang. - Engine tests: relaunch a child test application that macOS killed with SIGKILL before it wrote any output. - Apple smoke: reboot the simulator and retry when CoreSimulatorService drops its connection during boot or install. - AGENTS.md: add rules for writing tests that slow CI runners cannot break.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ReviewThis PR fixes load- and checkout-related CI failures. The changes are well targeted, and each has a comment saying why it is there. I found no blocking issues. What I checked
Minor point
Overall this looks good to merge once CI is green. |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThis PR makes CI tests more tolerant of busy runners and Windows checkouts.
No actionable issues were found. This review checked source code; it did not run tests. Reviews (1) · Last reviewed commit: "test: stabilise CI tests that fail under..." · Reviewed by Greptile |
Summary
I went through the failed runs of the
.NET,AOT,Locale Test,Platform smoke testsandCloudShop Example Testsworkflows since 2026-11-05: 271 failed.NETjobs and 187 failed jobs in the other workflows. Most failures were real breaks on a branch, such as Renovate major upgrades, runner image changes, or the PR's own changes. This PR fixes the failures that were caused by load, timing, or the checkout, not by a defect.InstantiationTest*, 7 tests:VerifiedLineEndingExceptionworkflow_dispatchand release run onmainsince 2026-11-14 (v1.88.0, v1.88.1). This one fails every time, it is not intermittent..cs,.fs,.razorand other files. They checked out with CRLF, and Verify rejects a verified file that contains\r..gitattributes: LF fortests/TUnit.Templates.Tests/Snapshots/**. Register.razorand.httpas Verify text extensions, so the template sources (CRLF on Windows) are compared without line endings. All 12 template tests now pass locally on Windows; before, 7 failed.Discovery_ReturnsFullTestCatalogue(net10.0):Timeout waiting for TCP connection after 60sdotnet run --no-buildhost failed to connect within 60 seconds.TUnit.TestProject.dlldirectly, without the MSBuild evaluation thatdotnet rundoes first. Give connect and initialize a 3-minute budget. A host that exits early still fails at once.RetainedLogs_FollowRuntimeInstance_AndSurviveDisposal,StartupDiagnostics_IncludeCrashedExecutableOutput: expectedInvalidOperationException, gotTimeoutExceptionResourceTimeoutwas 60 seconds. Under load, DCP did not report the probe's crash in time.ResourceTimeout. The fixture fails as soon as it sees the exit, so this only bounds a hang.AbstractClassTests,AfterEveryAssemblyHookTests,AfterEveryClassHookTests,AfterTestAttributeTests:wrote no trx file ... Did it crash?, exit code 137CoreSimulatorService: Connection interrupted(exit 53),(ipc/mig) server died(exit 204)Run-AppleSimulatorSmoke.sh.AGENTS.mdgets a new Writing resilient tests section: wait for events instead of time, no tight elapsed-time asserts, generous timeouts that only bound a hang, no dependence on order, culture, clock or line endings, isolated shared state, clear diagnostics for child processes, and[Retry]is not a fix.Not changed
InstallPlaywrightModule(ETARGET playwright-core@1.65.0): on 2026-11-05 npm listed a version that the registry could not resolve yet. It happened on one day only.NU1202and similar).MT7199/ Xcode 27.2 failures: runner image change on 2026-11-14, already fixed.Test plan
TUnit.Templates.Testson Windows: 12/12 pass (7 failed before, because of line endings)TUnit.RpcTests: 14 passed, 2 skipped (by design), with the direct host launchTUnit.Aspire.TestsCrashedExecutableLogTests: 2/2 passTUnit.Engine.Testsbuilds. I did not run it locally, as the repo guide says; CI covers it.bash -n scripts/Run-AppleSimulatorSmoke.shSummary by CodeRabbit