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