testing library

Test utilities for code built on walpack: in-memory multi-handle storage, durability simulation, and fault injection. Platform independent.

Classes

FaultInjectionBackend
Delegating StorageBackend wrapper that injects partial writes, mid-write crashes, and compaction swap failures for deterministic crash-safety tests.
MemoryStorageBackend
Fast, pure-Dart in-memory StorageBackend backed by a growable Uint8List.
SharedMemoryStorage
One in-memory "file" that several WalPack handles can open at once, to test multi-process behaviour (live sync(), watch(), OCC conflicts, peer compaction) without touching the disk. Works on every platform.

Exceptions / Errors

InjectedFaultException
Exception thrown intentionally by FaultInjectionBackend to simulate crashes or I/O failures mid-operation.