Expand description
Mock implementations of runtime primitives for testing.
Structs§
- Channel
- A mock channel struct that is used internally by Sink and Stream.
- Deferred
Sync - A sync deferred by a DelayedSyncBlob, held open until explicitly completed.
- Delayed
Sync Blob - Blob wrapper that parks each started sync and supports one-shot blocking sync tracking.
- Delayed
Sync Context - Context wrapper whose blobs defer Blob::start_sync and can gate blocking syncs in tests.
- Pending
Syncs - Coordinates durability operations for a DelayedSyncContext or DelayedSyncBlob.
- Sink
- A mock sink that implements the Sink trait.
- Stream
- A mock stream that implements the Stream trait.
- Sync
Fault Blob - Blob wrapper that fails
syncandstart_syncwhen marked faulty. - Sync
Fault Context - Context wrapper whose blobs fail
syncandstart_syncfor a single partition. - Write
Fault Blob - Blob wrapper that fails
write_atwhile its WriteFaults is armed. - Write
Fault Context - Context wrapper whose blobs fail
write_atwhile the shared WriteFaults is armed, counting successful writes. Unlike DelayedSyncContext, this injects failures into inline writes issued before any blob sync starts. - Write
Faults - Controls a WriteFaultContext: while armed, every
write_atfails with an injected error. Successful writes are counted.
Functions§
- drive_
pending_ syncs - Drive
futto completion, releasing any parked syncs each time it stalls. - fail_
pending_ syncs - Fail all pending syncs with an injected I/O error.
- next_
pending_ sync - Take the oldest pending sync, panicking if none was started.
- release_
next_ pending_ syncs - Complete the oldest
countpending syncs successfully. - release_
pending_ syncs - Complete all pending syncs successfully.