From 1b6bc2fc5be2fe17a398d7235f82d829623e898c Mon Sep 17 00:00:00 2001 From: Anusha Sharma Date: Tue, 24 Mar 2026 01:45:20 -0400 Subject: [PATCH 1/2] test: remove unnecessary sleep in waitable test Signed-off-by: Anusha Sharma --- rclcpp/test/rclcpp/executors/test_waitable.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rclcpp/test/rclcpp/executors/test_waitable.cpp b/rclcpp/test/rclcpp/executors/test_waitable.cpp index 3fe49e2633..36e97e1104 100644 --- a/rclcpp/test/rclcpp/executors/test_waitable.cpp +++ b/rclcpp/test/rclcpp/executors/test_waitable.cpp @@ -79,10 +79,7 @@ TestWaitable::execute(const std::shared_ptr &) if (nullptr != on_execute_callback_) { on_execute_callback_(); } else { - // TODO(wjwwood): I don't know why this was here, but probably it should - // not be there, or test cases where that is important should use the - // on_execute_callback? - std::this_thread::sleep_for(3ms); + // Removed unnecessary sleep based on TODO comment; tests should rely on explicit synchronization instead } } From 27154007cd92b299985390c7b715f5fea74a17ee Mon Sep 17 00:00:00 2001 From: Anusha Sharma Date: Wed, 25 Mar 2026 20:48:14 -0400 Subject: [PATCH 2/2] test: simplify execute logic by removing unnecessary else branch Signed-off-by: Anusha Sharma --- rclcpp/test/rclcpp/executors/test_waitable.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/rclcpp/test/rclcpp/executors/test_waitable.cpp b/rclcpp/test/rclcpp/executors/test_waitable.cpp index 36e97e1104..19ac24c8b2 100644 --- a/rclcpp/test/rclcpp/executors/test_waitable.cpp +++ b/rclcpp/test/rclcpp/executors/test_waitable.cpp @@ -78,8 +78,6 @@ TestWaitable::execute(const std::shared_ptr &) count_++; if (nullptr != on_execute_callback_) { on_execute_callback_(); - } else { - // Removed unnecessary sleep based on TODO comment; tests should rely on explicit synchronization instead } }