Property-testing async code in Rust to build reliable distributed systems
summary
Claim: nondeterministic awaits hide races; solution is a deterministic executor that uses Rust futures plus async_task and rand to control scheduling. Implementation: ~100 lines that track runnables, pick one by seeded RNG, and run permutations of task polls (works with Tokio-style spawn/block_on). Outcome: flaky 1% failures become reproducible by seed, enabling millions of randomized iterations and end-to-end CRDT editor tests in-process; practical stubs (filesystem, network) inject yield points so the technique scales to real systems.
AI-written summary · about
chapters (8)
- 0:00Intro
- 4:45Propertytesting
- 13:10Why Rust
- 13:45Code
- 17:10Test executor
- 25:35Test application
- 28:35Key takeaways
- 30:10Discussion
related talks
24mMissing Testing Features in Rust
32mEvent-Driven Infrastructure: Autonomous Operation and Unreliable Networks
28mDetecting the unexpected in React applications
29mRandomness In Tests (Don't Do It)
14mA Refinement Methodology for Distributed Programs in Rust
40mTesting Distributed Systems w/ Deterministic Simulation
23mRandomized Testing of Distributed Systems with Probabilistic Guarantees
42mSurprise yourself with Property Based Testing
