ci: run Core.Net.Tests single-threaded on the Linux runner only
All checks were successful
CI / linux-portable (push) Successful in 3m4s
CI / windows-gate (push) Successful in 4m59s
CI / release (push) Successful in 1m51s

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.
This commit is contained in:
Erik 2026-08-19 14:49:28 +02:00
parent ff01423f3f
commit 1a07f3e7f4

View file

@ -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