Files
synapse/rust
Erik Johnston 0c287237cb Add a Rust Clock::sleep method. (#20508)
The inbuilt `tokio::time::sleep` method works in production, but breaks
when in unit tests where time is set via the virtual time.

We add `tokio::time::sleep` to the disallowed-methods clippy lint,
pointing at the correct method to use.

We also change how the virtual test times work. We keep the global test
time set within Python unit tests, but also introduce per-clock virtual
times. In Python only one test runs at once (within a process), but on
Rust multiple tests can run at once, and so we need to be careful not to
use a process-global virtual time for rust tests.
2026-11-23 14:19:07 +00:00
..