thing-testkit: store::create pulls before writing

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-28 00:57:26 +01:00
commit 32205f8b2b

View file

@ -20,6 +20,9 @@ pub fn create(path: &Path) -> CultCache {
let _ = std::fs::remove_file(path);
let mut cache = memory();
cache.add_generic_backing_store(SingleFileMessagePackBackingStore::new(path)).unwrap();
// From cultcache-rs 0.4 a cache that attached a store refuses writes until it pulls; the file
// was just removed, so the pull is empty.
cache.pull_all_backing_stores().unwrap();
cache
}