From bcefcf938225f03963c05705edc1354f12f1a38e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 27 Oct 2026 03:49:16 +0100 Subject: [PATCH] Tests: declared-lossy id constant; successful-churn gate test races an attach with a long pre-publish check Not run at this commit. Co-Authored-By: Claude Sonnet 5.5 --- tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs | 5 ++++- tests/GameCult.Caching.Tests/RestampOnWriteTests.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs b/tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs index a501be67..acfff563 100644 --- a/tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs +++ b/tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs @@ -1456,10 +1456,13 @@ namespace GameCult.Caching.Tests rounds++; var store = new RoleStore(_path); store.ReleaseAttach.Set(); + // A cache holding many records makes the attach's checks before it publishes Cache take long enough to race. var cache = new CultCache(registry); + for (var index = 0; index < 20000; index++) + cache.Upsert(new IdDeck { Name = "held" + index }); using var barrier = new Barrier(2); var takes = 0; - var spin = (round % 128) * 20; + var spin = (round % 200) * 400; var caller = new Thread(() => { barrier.SignalAndWait(); diff --git a/tests/GameCult.Caching.Tests/RestampOnWriteTests.cs b/tests/GameCult.Caching.Tests/RestampOnWriteTests.cs index 83d808ca..1d5fcd23 100644 --- a/tests/GameCult.Caching.Tests/RestampOnWriteTests.cs +++ b/tests/GameCult.Caching.Tests/RestampOnWriteTests.cs @@ -54,7 +54,7 @@ namespace GameCult.Caching.Tests [Key(2)] public string Colour = string.Empty; } - private const string WideId = "sha256:f0d9ccd6e9a4a1c8b3a17f5b1ea1ce6b1fcd6a0f3ad1b28f2e1d4f7d91c0a2e3"; + private const string WideId = "sha256:82c2b721aceb56e00288baab590fabcdd82c3bda44400f7530fa9e29c4e96252"; private static readonly CultDocumentRegistry NarrowRegistry = CultDocumentRegistry.ForTypes(new[] { typeof(NoteNarrow) }); private static readonly CultDocumentRegistry GrownRegistry = CultDocumentRegistry.ForTypes(new[] { typeof(NoteGrown) });