scaled
Widen a fixture deadline by LIBTMUX_TEST_TIMEOUT_SCALE.
Source and package
- Qualified name
-
libtmux::test:: scaled - Module
- test
- Package
- libtmux
- Source
- crates/libtmux/src/test.rs
-
Description#
retry_until()and 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));