test.scaled
Rust
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- test
- Package
- libtmux
- Source
- crates/libtmux/src/test.rs
-
Widen a fixture deadline by
LIBTMUX_TEST_TIMEOUT_SCALE.retry_untiland the fixture's own deadlines already carry this. Reach for it when a test states a deadline of its own -- waiting on something this crate does not own, say -- so that it stretches on a loaded machine like the ones around it rather than becoming the first to fire.The scale never narrows a deadline: unset, unparseable, or below
1all leavebaseas it is.Examples
use std::time::Duration;use libtmux::test::scaled;// Unset, the scale is 1 and a deadline is its own length.assert!(scaled(Duration::from_secs(5)) >= Duration::from_secs(5));
0 declared, 0 inherited