macro_rules! conformance_lifecycle {
(open: $open:expr, reopen: $reopen:expr $(,)?) => { ... };
(open: $open:expr, reopen: $reopen:expr, skip_unless: $skip:expr $(,)?) => { ... };
}Expand description
Run the lifecycle conformance (persistent adapters only): open yields a
fresh (store, ctx); reopen consumes both and reopens the SAME storage.
open has the same factory shape as conformance!; reopen is
Fn(S, C) -> Fut<Output = (S, C)>, taking ownership of the prior
(store, guard) pair so it can drop the store before reopening the same
backing storage.
ⓘ
mnesis_store_testing::conformance_lifecycle! {
open: open_fresh,
reopen: |store: FjallStore, dir: TempDir| async move {
drop(store);
let reopened = FjallStore::builder(dir.path().join("db"))
.open()
.expect("reopen fjall store");
(reopened, dir)
},
}