Caching tests: the per-entry-point attach test upserts its later record under a fixed key

The previous code commit's AJournalOnTheAttachingThreadCannotReachItsStore failed all 21 cases:
AddAsync mints its own key, so "later" never appeared. That commit builds; its new test is red.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-25 21:49:23 +01:00
commit 2a77a312db

View file

@ -1279,7 +1279,7 @@ namespace GameCult.Caching.Tests
Assert.That(journalError!.Message, Does.StartWith(op is "writedoc" or "writerecord" ? ReentryRefusal : JournalRefusal));
Assert.That(store.IsDirty, Is.False, "nothing the cache never admitted is staged");
await cache.AddAsync(new IdDeck { Name = "later" });
await cache.UpsertAsync(typeof(IdDeck), new IdDeck { Name = "later" }, new CultRecordKey("later"));
Assert.DoesNotThrow(() => cache.FlushAllBackingStores());
using var fresh = new CultCache(registry, Codec(registry));
fresh.AddBackingStore(Open());