From c6a1bcaa69b076b5c29327ef68ee92e94ea98f2d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 26 Oct 2021 13:01:13 -0400 Subject: [PATCH] circmgr: Split request_timeout test into two. There seems to be some issue here with the new WaitFor code, where using the same MockSleepProvider with both of these wait_for() calls gives questionable behavior under some circumstances (like when running under Tarpaulin with the wrong set of flags). --- crates/tor-circmgr/src/mgr.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/tor-circmgr/src/mgr.rs b/crates/tor-circmgr/src/mgr.rs index 7cf90ec45..9929548a6 100644 --- a/crates/tor-circmgr/src/mgr.rs +++ b/crates/tor-circmgr/src/mgr.rs @@ -1436,6 +1436,13 @@ mod test { .await; assert!(matches!(c1, Err(Error::RequestFailed(_)))); + }); + } + + #[test] + fn request_timeout2() { + tor_rtcompat::test_with_one_runtime!(|rt| async { + let rt = MockSleepRuntime::new(rt); // Now try a more complicated case: we'll try to get things so // that we wait for a little over our predicted time because