UniqueIndexTests: stage the flush case through AddAsync

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-28 00:19:13 +01:00
commit 0c785446fd

View file

@ -284,7 +284,7 @@ namespace GameCult.Caching.Tests
using (var first = Open(path, StoreKind.Directory))
first.Commit(batch => batch.Upsert(typeof(UqItem), Item(Canary), Key("b")));
second.Upsert(Item(Canary), new CultRecordHandle<UqItem>(Key("c")));
second.AddAsync(Item(Canary), new CultRecordHandle<UqItem>(Key("c"))).GetAwaiter().GetResult();
Assert.Throws<CultWriteConflictException>(() => second.FlushAllBackingStores());
using var reopened = Open(path, StoreKind.Directory);