From 97dcaad1cabeb294514ad58e18b1a577cd2da45c Mon Sep 17 00:00:00 2001 From: Christian Eltzschig Date: Thu, 21 Nov 2024 21:22:32 +0100 Subject: [PATCH] [#390] Make timing test more stable --- iceoryx2/tests/waitset_tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iceoryx2/tests/waitset_tests.rs b/iceoryx2/tests/waitset_tests.rs index 14c6f0e3a..4ec13cf6a 100644 --- a/iceoryx2/tests/waitset_tests.rs +++ b/iceoryx2/tests/waitset_tests.rs @@ -520,11 +520,12 @@ mod waitset { .unwrap(); assert_that!(now.elapsed(), ge TIMEOUT); + let now = Instant::now(); sut.wait_and_process_once(|_| CallbackProgression::Continue) .unwrap(); - assert_that!(now.elapsed(), ge 2 * TIMEOUT); + assert_that!(now.elapsed(), ge TIMEOUT / 2); } #[instantiate_tests()]