Skip to content

Commit

Permalink
[#390] Make timing test more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Nov 21, 2024
1 parent b46883b commit dbf37d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions iceoryx2/tests/waitset_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,13 @@ mod waitset {
sut.wait_and_process_once(|_| CallbackProgression::Continue)
.unwrap();

assert_that!(now.elapsed(), ge TIMEOUT);
assert_that!(now.elapsed(), time_at_least TIMEOUT);
let now = Instant::now();

sut.wait_and_process_once(|_| CallbackProgression::Continue)
.unwrap();

assert_that!(now.elapsed(), ge 2 * TIMEOUT);
assert_that!(now.elapsed(), time_at_least TIMEOUT / 2);
}

#[instantiate_tests(<iceoryx2::service::ipc::Service>)]
Expand Down

0 comments on commit dbf37d1

Please sign in to comment.