acdream/tests
Erik dc0468cc2b fix(tests): replace sleep-race concurrency proofs in RetailDatLoaderTests
Two tests proved "these two unrelated DAT reads ran concurrently" by
racing a fixed Thread.Sleep(40) window against .NET thread-pool
scheduling latency for a second Task.Run. Under the CPU contention of
a full `dotnet test AcDream.slnx` run (all 9 test projects' VSTest
hosts launch concurrently) plus a busy machine, thread-pool injection
can occasionally miss the window, making MaxConcurrentReads read 1
instead of 2 and failing the assertion with no underlying code defect.

RetailAnimationLoader and RetailPhysicsScriptLoader both coalesce
same-key reads correctly via ConcurrentDictionary<K, Lazy<T>>.GetOrAdd,
which is atomic and timing-independent (verified by reading, not just
running) - only the test's method of proving cross-key overlap was
timing-fragile. DecodedTextureCacheTests already uses the correct
deterministic-gate pattern; this brings RetailDatLoaderTests in line
with it via a Barrier-backed rendezvous instead of a sleep race.

Filed as #248 (docs/ISSUES.md) with the full attempt matrix: could not
catch the originally-reported AcDream.Content.Tests failure in the act
despite ~72 Content.Tests executions across four contention strategies
over ~30 full-suite-equivalent runs, though the general mechanism
reproduced 3x in AcDream.App.Tests's already-known zero-allocation
flake class (left untouched, out of scope here).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 11:03:03 +02:00
..
AcDream.App.Tests fix(physics): TS-46 - seed the sweep from the Setup's own sphere list 2026-07-30 09:05:44 +02:00
AcDream.Bake.Tests feat(content): bake and read flat collision assets 2026-07-25 15:22:08 +02:00
AcDream.Cli.Tests perf(diag): complete trustworthy Slice A capture tooling 2026-07-24 12:46:51 +02:00
AcDream.Content.Tests fix(tests): replace sleep-race concurrency proofs in RetailDatLoaderTests 2026-07-30 11:03:03 +02:00
AcDream.Core.Net.Tests feat(net): N6 - ConnectResponse retransmit + fragment assembler eviction 2026-07-29 17:20:12 +02:00
AcDream.Core.Tests test(physics): P4 review - RestrictionObj prevalence inspection over the installed cell DAT 2026-07-30 11:01:10 +02:00
AcDream.Core.Tests.Fixtures.HelloPlugin feat(core): add PluginLoader with collectible ALC 2026-04-10 09:51:16 +02:00
AcDream.Headless.Tests perf(headless): enforce K4 resource envelope 2026-07-27 11:14:50 +02:00
AcDream.Runtime.Tests review(physics): P2 Opus review APPROVE - fix rounding-boundary assertion exposed by AP-7 friction 2026-07-30 08:36:17 +02:00
AcDream.UI.Abstractions.Tests feat(linux): add graphical platform services 2026-07-27 11:54:59 +02:00