fix: make alternative async runtime timeout assert more permissive (#2079)

* fix: make alternative async runtime timeout assert more permissive
This commit is contained in:
Zelda Hessler 2022-12-08 13:40:31 -06:00 committed by GitHub
parent 3b8e0eebe4
commit 5e1ad291eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ async fn timeout_test(sleep_impl: Arc<dyn AsyncSleep>) -> Result<(), Box<dyn std
assert_eq!("TimeoutError(TimeoutError { source: RequestTimeoutError { kind: \"operation timeout (all attempts including retries)\", duration: 500ms } })", format!("{:?}", err));
// Assert 500ms have passed with a 10ms margin of error
assert_elapsed!(now, Duration::from_millis(500), Duration::from_millis(10));
assert_elapsed!(now, Duration::from_millis(500), Duration::from_millis(100));
Ok(())
}