Skip to main content

Module mocks

Module mocks 

Source
Expand description

Mock implementations of runtime primitives for testing.

Structs§

Channel
A mock channel struct that is used internally by Sink and Stream.
DeferredSync
A sync deferred by a DelayedSyncBlob, held open until explicitly completed.
DelayedSyncBlob
Blob wrapper that parks each started sync and supports one-shot blocking sync tracking.
DelayedSyncContext
Context wrapper whose blobs defer Blob::start_sync and can gate blocking syncs in tests.
PendingSyncs
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.
SyncFaultBlob
Blob wrapper that fails sync and start_sync when marked faulty.
SyncFaultContext
Context wrapper whose blobs fail sync and start_sync for a single partition.

Functions§

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 count pending syncs successfully.
release_pending_syncs
Complete all pending syncs successfully.