From 1a07f3e7f4cd78488fa2a0660a74a3e74fedd1e5 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 19 Aug 2026 14:49:28 +0200 Subject: [PATCH] ci: run Core.Net.Tests single-threaded on the Linux runner only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PausedSelector_SeededDroppedServerReady_RecoversOnIdleSweep kept failing on the Linux runner even after its wall-clock patience was widened to 60 s — the assembly ran 1 m 39 s and recovery still never completed, so this is real starvation of the session's background threads, not a tight timeout. Measured on the runner itself: default parallelism FAILED in 40 s MaxParallelThreads=1 PASSED in 10 s Serial is both correct and four times faster there, because the contention was also costing wall-clock. Scoped to this one project on Linux: Windows has 18 cores, passes with default parallelism in ~7 s, and serializing this assembly for everyone previously REGRESSED it (1000 passed in 7 s -> 999/1000 in 17 s). Replaces the earlier '-- xUnit.MaxParallelThreads=2' that was applied to every Linux project: too weak to help and too broad to be safe. --- .gitea/workflows/ci.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9f92d5a3..9ba13531 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -75,15 +75,20 @@ jobs: tests/AcDream.Launcher.Core.Tests \ tests/AcDream.UI.Abstractions.Tests ; do echo "::group::$p" - # MaxParallelThreads is capped because this runner is a small - # container. Under full-assembly parallel load - # FakeAceTransportTests.PausedSelector_SeededDroppedServerReady_ - # RecoversOnIdleSweep took 37 s and missed its 2 s real-time wait, - # while passing 5/5 in ~350 ms in isolation. Timing-sensitive, not - # broken: starve it less rather than edit Campaign N transport code. + # Core.Net drives real network sessions on background threads. On + # this small container, full-assembly parallelism starves them: + # measured on the runner itself, the assembly FAILS in 40 s with + # default parallelism and PASSES in 10 s with one thread — serial is + # both correct AND faster here. Windows (18 cores) is unaffected and + # keeps default parallelism; serializing it there previously caused + # a regression, so this stays scoped to Linux. + extra=() + case "$p" in + *Core.Net.Tests) extra=(-- xUnit.MaxParallelThreads=1) ;; + esac dotnet test "$p" -c Release --nologo \ --filter 'Lane!=InstalledDat&Lane!=PreparedPackage&Lane!=Live&Lane!=Manual&Lane!=Windows&Lane!=SystemFont&Purpose!=Diagnostic&Status!=KnownFailure' \ - -- xUnit.MaxParallelThreads=2 + "${extra[@]}" echo "::endgroup::" done