From e06d5a2e8cdb451c33fda576a670fb45ec2b9960 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 23 Oct 2026 12:21:38 +0200 Subject: [PATCH] CachelessSingleFileTests: the second cache's record is keyed by its name's hash, so assert the file's three records, not the key "c" Co-Authored-By: Claude Opus 5.5 --- tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs b/tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs index 8a65f939..a2dbb0fd 100644 --- a/tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs +++ b/tests/GameCult.Caching.Tests/CachelessSingleFileTests.cs @@ -323,7 +323,9 @@ namespace GameCult.Caching.Tests Assert.That(store.Attached, Is.SameAs(registry2), "the call's end did not detach the second cache's registry"); await cache2.AddAsync(new IdDeck { Name = "c" }); Assert.DoesNotThrow(() => cache2.FlushAllBackingStores()); - Assert.That(new SingleFileMessagePackBackingStore(_path).ReadStoreSnapshot()!.Records.Select(record => record.Key), Is.SupersetOf(new[] { "a", "first", "c" })); + var keys = new SingleFileMessagePackBackingStore(_path).ReadStoreSnapshot()!.Records.Select(record => record.Key).ToArray(); + Assert.That(keys, Has.Length.EqualTo(3), "the seed, the call's record and the cache's record"); + Assert.That(keys, Does.Contain("a").And.Contain("first")); } // The attach waits for a call that is already inside the store, wherever in the call it is: here inside the payload encoding,