From 4282d507cfdfa18cd9999fa5657ec589a934ade7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 12 Oct 2026 02:06:26 +0200 Subject: [PATCH] Caching tests: the wrong-catalog refusal is raised while the store is added, so both steps sit inside the asserted call Previous commit 122894f5 failed these four cases (AddBackingStore threw outside Assert.CatchAsync). Co-Authored-By: Claude Sonnet 5.5 --- tests/GameCult.Caching.Tests/PythonWrittenStoreTests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/GameCult.Caching.Tests/PythonWrittenStoreTests.cs b/tests/GameCult.Caching.Tests/PythonWrittenStoreTests.cs index 00fd013e..6b26e90b 100644 --- a/tests/GameCult.Caching.Tests/PythonWrittenStoreTests.cs +++ b/tests/GameCult.Caching.Tests/PythonWrittenStoreTests.cs @@ -76,8 +76,12 @@ namespace GameCult.Caching.Tests try { var cache = new CultCache(); - cache.AddBackingStore(new SingleFileMessagePackBackingStore(Store($"wrong-slot-{slot}.cc", scratch))); - var error = Assert.CatchAsync(async () => await cache.PullAllBackingStoresAsync()); + var path = Store($"wrong-slot-{slot}.cc", scratch); + var error = Assert.CatchAsync(async () => + { + cache.AddBackingStore(new SingleFileMessagePackBackingStore(path)); + await cache.PullAllBackingStoresAsync(); + }); Assert.That(error!.Message, Does.Contain($"slot {slot} changed type")); } finally