Turmoil
This is very experimental
Add hardship to your tests.
Turmoil is a framework for testing distributed systems. It provides deterministic execution by running multiple concurrent hosts within a single thread. It introduces "hardship" into the system via changes in the simulated network and filesystem. Both can be controlled manually or with a seeded rng.
Quickstart
Add this to your Cargo.toml.
[]
= "0.7"
See crate documentation for simulation setup instructions.
Examples
Filesystem Simulation (unstable)
Requires the unstable-fs feature.
[]
= { = "0.7", = ["unstable-fs"] }
Turmoil provides simulated filesystem types for crash-consistency testing:
use OpenOptions;
use FileExt;
let file = new
.read
.write
.create
.open?;
file.write_all_at?;
file.sync_all?; // Data now durable, survives sim.crash()
Each host has isolated filesystem state. Use Builder::fs_sync_probability() to
configure random sync behavior for testing crash recovery.
License
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in turmoil by you, shall be licensed as MIT,
without any additional terms or conditions.