ModernUO/Projects/Server.Tests/Tests
Kamron Batman 65bdfe6cd7
fix(tests): serialize test classes that rent through STArrayPool
STArrayPool is single-threaded by design and its bucket cache is a plain static,
not thread-static, with a check-then-act initialize in Return():

    var cacheBuckets = _cacheBuckets ?? InitializeBuckets();

Two threads both see null, both initialize, and the loser trips
Debug.Assert(_cacheBuckets is null). Anything renting from it therefore has to be
kept off parallel test threads, which is what the DisableParallelization
collections exist for.

ObjectPropertyListReentrancyTests and ObjectPropertyListNestedBuildTests build
property lists, which rent the interpolation buffer, but were not in the
sequential collection -- unlike PropertyListInvalidationDuringBuildTests in the
same file. That is the macOS CI failure on this PR: Debug.Fail "Non-null
_cacheBuckets" out of ObjectPropertyList.Dispose. It is timing-dependent, so it
surfaces on some platforms and not others.

AutoDenylistTests has the same exposure: its cap tests reach AutoDenylist.Sweep,
which rents a PooledRefList without mt. The blocklist tests need no marking
because BlocklistSnapshot.Build asks for the mt pool explicitly, which is the
distinction worth remembering.

No production change: STArrayPool is the right pool on the game loop, where both
Sweep and the property list actually run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 18:33:32 -07:00
..
Buffers fix: Harden Advanced Search: crash-safety, autosave, correct results & worker fixes (#2543) 2026-07-21 07:51:06 -07:00
Client fix: Fixes flaky tests, formatting, and sequential testing. (#2168) 2025-04-30 16:42:38 -07:00
Collections chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
Console fix(console): stop headless servers from pegging a CPU core (#2535) 2026-07-16 18:52:43 -07:00
Geometry chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
Items fix: Items dropped on the ground never decay (#2536) 2026-07-16 18:51:04 -07:00
Json fix(json): Rectangle3DConverter loses a z-level on write (#2506) 2026-06-25 23:42:49 -07:00
Localization fix: Fixes flaky tests, formatting, and sequential testing. (#2168) 2025-04-30 16:42:38 -07:00
Maps perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
Network feat(network): allowlist false-positive IPs, escalate on behaviour 2026-07-30 18:31:34 -07:00
PropertyList fix(tests): serialize test classes that rent through STArrayPool 2026-07-30 18:33:32 -07:00
Serialization perf(saves): eliminate world-save freeze bottlenecks (~9.5x faster freeze) (#2525) 2026-07-16 22:53:28 -07:00
Text chore: Code Cleanup (#1239) 2022-11-10 22:49:25 -08:00
Timer chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
Utility chore: Fixes flaky tests (#2386) 2026-03-22 10:54:12 -07:00
World chore: Use var everywhere (#2294) 2025-12-27 16:47:28 -08:00
SerialTests.cs fix: Adds ISpanFormattable support to Serial (#1065) 2022-06-14 18:39:46 -07:00