test: timing test waits longer than expiry
This commit is contained in:
parent
b1d5344cfa
commit
5d64692f31
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,8 @@ fn when_history_has_expired_then_message_is_passed() {
|
||||||
let result = history.sendable(user_notification);
|
let result = history.sendable(user_notification);
|
||||||
let_assert!(Some(user_notification) = result);
|
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);
|
std::thread::sleep(dur);
|
||||||
|
|
||||||
// after dur, message has expired, so is still valid
|
// after dur, message has expired, so is still valid
|
||||||
|
|
Loading…
Reference in a new issue