Probable fix for flaky test

This commit is contained in:
Damien Elmes 2023-01-18 21:29:37 +10:00
parent f169ee0933
commit 9d84f357b6

View File

@ -194,9 +194,11 @@ mod test {
use super::*; use super::*;
use crate::sync::error::HttpError; use crate::sync::error::HttpError;
/// Longer delays on Windows /// The delays in the tests are aggressively short, and false positives slip through
/// on a loaded system - especially on Windows. Fix by applying a universal
/// multiplier.
fn millis(millis: u64) -> Duration { fn millis(millis: u64) -> Duration {
Duration::from_millis(millis * if cfg!(windows) { 10 } else { 1 }) Duration::from_millis(millis * if cfg!(windows) { 10 } else { 5 })
} }
#[tokio::test] #[tokio::test]