From 8c0161a07f1a44db023650d10f1b2e581c64e1f1 Mon Sep 17 00:00:00 2001 From: Tomoya Fujita Date: Mon, 9 Dec 2024 13:15:40 -0800 Subject: [PATCH] fix TestTimeSource.ROS_time_valid_attach_detach. (#2700) Signed-off-by: Tomoya Fujita --- rclcpp/test/rclcpp/test_time_source.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rclcpp/test/rclcpp/test_time_source.cpp b/rclcpp/test/rclcpp/test_time_source.cpp index 1437e47126..cb799cbae0 100644 --- a/rclcpp/test/rclcpp/test_time_source.cpp +++ b/rclcpp/test/rclcpp/test_time_source.cpp @@ -212,6 +212,9 @@ TEST_F(TestTimeSource, ROS_time_valid_attach_detach) { ts.attachNode(node); EXPECT_FALSE(ros_clock->ros_time_is_active()); + ts.attachClock(ros_clock); + EXPECT_FALSE(ros_clock->ros_time_is_active()); + ts.detachClock(ros_clock); EXPECT_FALSE(ros_clock->ros_time_is_active()); }