test(saves): serialize persistence-constructing tests

Constructing a Persistence mutates the static registry - an unsynchronized
SortedSet - and Unregister mutates it again. ShadowDictionaryEntriesTests
and SerializationChunkSourceTests did this outside the sequential
collection, so a parallel xunit collection could corrupt the tree
mid-insert: observed on CI as an NRE in SortedSet.InsertionBalance from
Persistence..ctor. Both classes now share the Sequential Server Tests
collection with the other registry mutators.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kamron Batman 2026-07-16 22:38:30 -07:00
parent 95b225aef7
commit 22ceb83372
No known key found for this signature in database
GPG key ID: 7D81DF26D9A5D94A
2 changed files with 8 additions and 0 deletions

View file

@ -4,6 +4,10 @@ using Xunit;
namespace Server.Tests;
// Constructing a persistence mutates the static Persistence registry (an unsynchronized
// SortedSet); every test that does so must share the sequential collection or parallel
// collections corrupt the tree.
[Collection("Sequential Server Tests")]
public class SerializationChunkSourceTests
{
private class TestEntity : IGenericSerializable