Skip to content

Commit

Permalink
Relax multithreaded test constraint (#907)
Browse files Browse the repository at this point in the history
Signed-off-by: Anas Abou Allaban <[email protected]>
  • Loading branch information
piraka9011 authored and jacobperron committed Oct 30, 2019
1 parent 8cc2a9b commit 2ed4456
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rclcpp/test/executors/test_multi_threaded_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
};
Expand Down

0 comments on commit 2ed4456

Please sign in to comment.