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.
-
One in-memory "file" that several
WalPackhandles can open at once, to test multi-process behaviour (livesync(),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.