https://github.com/tokio-rs/turmoil
Add hardship to your tests
https://github.com/tokio-rs/turmoil
Last synced: about 1 month ago
JSON representation
Add hardship to your tests
- Host: GitHub
- URL: https://github.com/tokio-rs/turmoil
- Owner: tokio-rs
- License: mit
- Created: 2022-08-03T23:38:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T17:52:39.000Z (3 months ago)
- Last Synced: 2025-05-06T15:45:14.557Z (about 2 months ago)
- Language: Rust
- Size: 322 KB
- Stars: 959
- Watchers: 20
- Forks: 63
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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. The network can be controlled manually or with a seeded rng.[![Crates.io][crates-badge]][crates-url]
[![Documentation][docs-badge]][docs-url]
[![Build Status][actions-badge]][actions-url]
[![Discord chat][discord-badge]][discord-url][crates-badge]: https://img.shields.io/crates/v/turmoil.svg
[crates-url]: https://crates.io/crates/turmoil
[docs-badge]: https://docs.rs/turmoil/badge.svg
[docs-url]: https://docs.rs/turmoil
[actions-badge]: https://github.com/tokio-rs/turmoil/actions/workflows/rust.yml/badge.svg?branch=main
[actions-url]: https://github.com/tokio-rs/turmoil/actions?query=workflow%3ACI+branch%3Amain
[discord-badge]: https://img.shields.io/discord/500028886025895936.svg?logo=discord&style=flat-square
[discord-url]: https://discord.com/channels/500028886025895936/628283075398467594## Quickstart
Add this to your `Cargo.toml`.
```toml
[dev-dependencies]
turmoil = "0.6"
```See crate documentation for simulation setup instructions.
### Examples
- [/tests](https://github.com/tokio-rs/turmoil/tree/main/tests) for TCP and UDP.
- [`gRPC`](https://github.com/tokio-rs/turmoil/tree/main/examples/grpc) using
`tonic` and `hyper`.
- [`axum`](https://github.com/tokio-rs/turmoil/tree/main/examples/axum)## License
This project is licensed under the [MIT license](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.