Repository navigation
Stabilize three flaky cross-platform CI tests - #924
Conversation
PR Summary by QodoStabilize three flaky cross-platform CI tests
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. Three commits omit issue links
|
| // The retry path fires on a transport fault, so inject one: a first attempt that faults like | ||
| // a refused connection, then a success. Driving this through a real server on a restarted | ||
| // port is racy — a neighbour can grab the freed port, or a request can land after the | ||
| // listener opens but before its mapping is registered, which returns a final 404. |
There was a problem hiding this comment.
1. Three commits omit issue links 📘 Rule violation ⚙ Maintainability
The subjects Inject the transport fault in the retry test instead of a real server, `Wait for the killed holder to exit before deleting its snapshot, and Claim the Avalonia UI thread before any test in the assembly runs omit the required trailing (#<digits>)` reference. All three commits reach the branch history without an explicit GitHub issue association, despite the PR description identifying corresponding issues #916, #917, and #918.
0812031 to
e989f30
Compare
…#916) The retry path fires on a transport fault. A real server on a restarted port raced two ways: a neighbour grabbing the freed port, or a request landing after the listener opened but before its mapping registered (a final 404). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Process.Kill returns before a process releases its working-directory handle, so the test launches the long-lived cwd owner directly (no wrapper child that could outlive the wait) and awaits its exit before deleting the snapshot on Windows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Dispatcher.UIThread binds to whichever thread first touches it. A parallel test on a thread-pool thread binding it elsewhere makes the headless app build fail VerifyAccess in the compositor ctor, so the session must claim it first. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e989f30 to
3039d5e
Compare
Closes #916 — AI-2732
Closes #917 — AI-2733
Closes #918 — AI-2734
What & why
Three cross-platform CI flakes, each a test-only timing race, fixed together:
HttpMessageHandler— no port, no server, no race.cmd.exewhose cwd was the snapshot and deleted the snapshot immediately.Process.Killreturns before the child releases its directory handle, so the delete raced the exit. It now awaitsWaitForExitAsyncfirst.Dispatcher.UIThreadbinds to whichever thread first touches it; a parallel test binding it off the session thread made the headless app build failVerifyAccess. A[Before(Assembly)]hook now builds the app on the session thread first, claiming the binding.Verification
PostWithRetryTests— 2/2 passedWorktreeManagerTests.BorrowedSnapshot_RefreshPreservesRunningExecutionDirectory— 1/1 passedCapacitor.App.Tests.Unitsuite — 1921/1921 passed🤖 Generated with Claude Code