diff --git a/rclcpp/test/executors/test_multi_threaded_executor.cpp b/rclcpp/test/executors/test_multi_threaded_executor.cpp index e6c2bcb7f5..45cbe86755 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); } } };