From c53789f1973c9109148f5619522835d92b3f6cdc Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 22 Oct 2026 22:35:53 +0200 Subject: [PATCH] Caching tests: the ref-list store reports compatible drift, then flushes through PushAll Co-Authored-By: Claude Sonnet 5.5 --- tests/GameCult.Caching.Tests/RefListDriftTests.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/GameCult.Caching.Tests/RefListDriftTests.cs b/tests/GameCult.Caching.Tests/RefListDriftTests.cs index a8b7f3e3..0582ac8e 100644 --- a/tests/GameCult.Caching.Tests/RefListDriftTests.cs +++ b/tests/GameCult.Caching.Tests/RefListDriftTests.cs @@ -55,8 +55,12 @@ namespace GameCult.Caching.Tests try { using var cache = new CultCache(); - cache.AddBackingStore(new SingleFileMessagePackBackingStore(copy)); + var store = new SingleFileMessagePackBackingStore(copy); + cache.AddBackingStore(store); await cache.PullAllBackingStoresAsync(); + Assert.That( + store.LastSchemaMigrationReports.Single(report => report.PersistedSchemaName == "tests.reflist_holder").Kind, + Is.EqualTo(CultSchemaMigrationKind.CompatibleDrift)); var holder = cache.GetAll().Single(); Assert.That(holder.Items.Select(item => item.Key.Value), Is.EqualTo(new[] { "alpha", "beta" })); @@ -64,6 +68,7 @@ namespace GameCult.Caching.Tests // A write flushes the store under the 2.0 schema; the list reads back unchanged. await cache.AddAsync(new RefListTarget { Name = "gamma" }); + store.PushAll(); using var reopened = new CultCache(); reopened.AddBackingStore(new SingleFileMessagePackBackingStore(copy)); await reopened.PullAllBackingStoresAsync();