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 <noreply@anthropic.com>
This commit is contained in:
parent
122894f5f8
commit
4282d507cf
1 changed files with 6 additions and 2 deletions
|
|
@ -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<Exception>(async () => await cache.PullAllBackingStoresAsync());
|
||||
var path = Store($"wrong-slot-{slot}.cc", scratch);
|
||||
var error = Assert.CatchAsync<Exception>(async () =>
|
||||
{
|
||||
cache.AddBackingStore(new SingleFileMessagePackBackingStore(path));
|
||||
await cache.PullAllBackingStoresAsync();
|
||||
});
|
||||
Assert.That(error!.Message, Does.Contain($"slot {slot} changed type"));
|
||||
}
|
||||
finally
|
||||
|
|
|
|||
Loading…
Reference in a new issue