-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
This test is flaky:
TEST_F(TestNode, now) {
auto node = std::make_shared<rclcpp::Node>("my_node", "/ns");
auto clock = node->get_clock();
auto now_builtin = node->now().nanoseconds();
auto now_external = clock->now().nanoseconds();
EXPECT_GE(now_external, now_builtin);
EXPECT_LT(now_external - now_builtin, 50000L);
}
The failures that I've seen are always on OS X, at the last line.
Here are some examples:
https://ci.ros2.org/view/nightly/job/nightly_osx_repeated/1039/testReport/junit/rclcpp/TestNode/now/ (mini1)
https://ci.ros2.org/view/nightly/job/nightly_osx_repeated/1046/testReport/junit/rclcpp/TestNode/now/ (mini2)
https://ci.ros2.org/view/nightly/job/nightly_osx_repeated/1047/testReport/junit/rclcpp/TestNode/now/ (mini3)
The time difference is ~1ms (0.98, 1.33, 1.27, ...) instead of the 0.05ms being compared against.
@tfoote given the implementation details, does anything come to mind about what could cause the >1ms difference? Or could this could be reasonable behaviour?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working