From 5d64692f31ab458d022b958c67bd18236f752d4a Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Aug 2024 10:03:40 +0100 Subject: [PATCH] test: timing test waits longer than expiry --- crates/cli/src/alerts/tests/history.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/cli/src/alerts/tests/history.rs b/crates/cli/src/alerts/tests/history.rs index 2235e2fd..1f1b14c7 100644 --- a/crates/cli/src/alerts/tests/history.rs +++ b/crates/cli/src/alerts/tests/history.rs @@ -35,6 +35,8 @@ fn when_history_has_expired_then_message_is_passed() { let result = history.sendable(user_notification); let_assert!(Some(user_notification) = result); + std::thread::sleep(dur); + // twice the expiry duration to avoid things happening in the wrong order std::thread::sleep(dur); // after dur, message has expired, so is still valid