-
Notifications
You must be signed in to change notification settings - Fork 90
Replace deprecated spin_some in realtime_tools #448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace deprecated spin_some in realtime_tools #448
Conversation
…r::spin_some() in realtime_server_goal_handle_tests.cpp. Refactor polling in ActionServerCallbacks::wait_for_handle, ActionClientCallbacks::wait_for_feedback, and send_goal() to create a SingleThreadedExecutor, add_node(node), and call spin_some(). In set_canceled, use a short-lived SingleThreadedExecutor inside the wait loop before spin_some() to process events without reusing an executor. This modernizes the tests for current rclcpp APIs and removes deprecation warnings with no change to test behavior.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #448 +/- ##
==========================================
+ Coverage 85.20% 85.32% +0.11%
==========================================
Files 17 17
Lines 1386 1397 +11
Branches 132 132
==========================================
+ Hits 1181 1192 +11
Misses 119 119
Partials 86 86
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I was thinking if the executor shouldn't be part of a test fixture instead of creating one all over the place. But I think that inside the tests this is also fine.
(cherry picked from commit 59ff73b)
(cherry picked from commit 59ff73b)
Overview
This PR replaces uses of the deprecated rclcpp::spin_some(node) with rclcpp::executors::SingleThreadedExecutor in the realtime tools tests, addressing issue #411
What changed
Files changed are:
Notes for Reviewer
Happy to make any changes that are requested. Please also double check my approach with the spin_some() usage in the TEST(RealtimeServerGoalHandle, set_canceled) test.