Skip to main content

event_store_concurrency_conformance

Macro event_store_concurrency_conformance 

macro_rules! event_store_concurrency_conformance {
    (mod_name = $mod_name:ident, emit = $emit:path, fixture = $fixture:expr) => { ... };
    (mod_name = $mod_name:ident, fixture = $fixture:expr) => { ... };
    ($fixture:expr) => { ... };
}
Available on non-WebAssembly only.
Expand description

Generates the concurrency conformance suite for an event store adapter.

Opt-in. An adapter invokes this separately from event_store_conformance!, and an adapter whose store is !Send — the Cloudflare Durable Object is the workspace’s — cannot invoke it and must not be expected to. The bound is F::Store: EventStore + Send: the handle has to be movable between threads, which is precisely the property ADR-0001 exists to keep optional.

It does not exist on wasm32-unknown-unknown, which has no threads to race on. Gate the invocation as this crate’s own tests/memory_concurrency_conformance.rs does.

§Examples

use happenstance_testkit::fixtures::MemoryFixture;

happenstance_testkit::event_store_concurrency_conformance!(MemoryFixture::new());