What is Deterministic Simulation Testing in MadSim?
mainMadSim is an async runtime designed for deterministic simulation testing. Unlike standard runtimes, MadSim can:
- Amplify randomness: Control and repeat specific random sequences.
- Create chaos: Inject network partitions, disconnect nodes, or kill processes.
- Inject failures: Simulate I/O errors and other system uncertainties.
Because the simulation is deterministic, any bug revealed by the simulator can be reproduced exactly by using the same seed, allowing for reliable debugging of complex distributed systems. To control these behaviors, use the APIs provided by the madsim feature.