From 2ed445647400bacbff6420cfb8ccc7bee86ee469 Mon Sep 17 00:00:00 2001 From: Anas Abou Allaban Date: Tue, 29 Oct 2019 20:50:17 -0700 Subject: [PATCH] Relax multithreaded test constraint (#907) Signed-off-by: Anas Abou Allaban --- rclcpp/test/executors/test_multi_threaded_executor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rclcpp/test/executors/test_multi_threaded_executor.cpp b/rclcpp/test/executors/test_multi_threaded_executor.cpp index e6c2bcb..45cbe86 100644 --- a/rclcpp/test/executors/test_multi_threaded_executor.cpp +++ b/rclcpp/test/executors/test_multi_threaded_executor.cpp @@ -89,10 +89,9 @@ TEST_F(TestMultiThreadedExecutor, timer_over_take) { double diff = std::abs((now - last).nanoseconds()) / 1.0e9; last = now; - if (diff < PERIOD - TOLERANCE || diff > PERIOD + TOLERANCE) { + if (diff < PERIOD - TOLERANCE) { executor.cancel(); ASSERT_GT(diff, PERIOD - TOLERANCE); - ASSERT_LT(diff, PERIOD + TOLERANCE); } } };