From c867cfa917c5c7fc79ac812965fc25183572b3a5 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 29 Apr 2021 12:52:28 -0700 Subject: [PATCH] Tweak durations in fsevent unit test to reduce odds of timeout --- fsevent/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsevent/src/lib.rs b/fsevent/src/lib.rs index 07a43a43b9..44af8f1ba6 100644 --- a/fsevent/src/lib.rs +++ b/fsevent/src/lib.rs @@ -345,12 +345,12 @@ mod tests { // Delay the call to `run` in order to make sure we don't miss any events that occur // between creating the `EventStream` and calling `run`. thread::spawn(move || { - thread::sleep(Duration::from_millis(250)); + thread::sleep(Duration::from_millis(100)); stream.run(move |events| tx.send(events.to_vec()).is_ok()) }); fs::write(path.join("new-file"), "").unwrap(); - let events = rx.recv_timeout(Duration::from_millis(500)).unwrap(); + let events = rx.recv_timeout(Duration::from_millis(800)).unwrap(); let event = events.last().unwrap(); assert_eq!(event.path, path.join("new-file")); assert!(event.flags.contains(StreamFlags::ITEM_CREATED));