-
Notifications
You must be signed in to change notification settings - Fork 412
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
Added missing tests for rclcpp lifecycle #1240
Conversation
- remove_on_set_parameters_callback - notify_graph_change - get_service_names_and_types_by_node Signed-off-by: ahcorde <ahcorde@gmail.com>
{ | ||
auto node = std::make_shared<LifecycleServiceClient>("client_wait_for_graph_change"); | ||
auto * node_graph = | ||
dynamic_cast<rclcpp::node_interfaces::NodeGraph *>(node->get_node_graph_interface().get()); |
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.
Is the dynamic_cast necessary?
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.
I copy this line from the original test
rclcpp/rclcpp/test/rclcpp/node_interfaces/test_node_graph.cpp
Lines 47 to 48 in 7e68d35
const auto * node_graph = | |
dynamic_cast<rclcpp::node_interfaces::NodeGraph *>(node->get_node_graph_interface().get()); |
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.
That test was for node_interfaces explicitly, and I wanted to verify that the cast to NodeGraph* was doing what I thought it was.
I think for this test, the std::shared_ptr<NodeGraphInterface>
from get_node_graph_interface()
should be sufficient.
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>
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.
Sorry this review slipped through the cracks
@@ -355,3 +356,52 @@ TEST_F(TestLifecycleServiceClient, lifecycle_transitions) { | |||
transitions = lifecycle_client()->get_available_transitions(); | |||
EXPECT_EQ(transitions.size(), 0u); | |||
} | |||
|
|||
|
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.
Remove extra line
Signed-off-by: ahcorde <ahcorde@gmail.com>
3b4bfba
to
49dd1bd
Compare
* Added missing test rclcpp lifecycle - remove_on_set_parameters_callback - notify_graph_change - get_service_names_and_types_by_node Signed-off-by: ahcorde <ahcorde@gmail.com> * omit the name of the argument in lambda function Signed-off-by: ahcorde <ahcorde@gmail.com> * Added feedback Signed-off-by: ahcorde <ahcorde@gmail.com> * Added feedback Signed-off-by: ahcorde <ahcorde@gmail.com> * Removed extra line Signed-off-by: ahcorde <ahcorde@gmail.com> Signed-off-by: Pedro Pena <peter.a.pena@gmail.com>
* Added missing test rclcpp lifecycle - remove_on_set_parameters_callback - notify_graph_change - get_service_names_and_types_by_node Signed-off-by: ahcorde <ahcorde@gmail.com> * omit the name of the argument in lambda function Signed-off-by: ahcorde <ahcorde@gmail.com> * Added feedback Signed-off-by: ahcorde <ahcorde@gmail.com> * Added feedback Signed-off-by: ahcorde <ahcorde@gmail.com> * Removed extra line Signed-off-by: ahcorde <ahcorde@gmail.com>
* Added missing test rclcpp lifecycle - remove_on_set_parameters_callback - notify_graph_change - get_service_names_and_types_by_node Signed-off-by: ahcorde <ahcorde@gmail.com> * omit the name of the argument in lambda function Signed-off-by: ahcorde <ahcorde@gmail.com> * Added feedback Signed-off-by: ahcorde <ahcorde@gmail.com> * Added feedback Signed-off-by: ahcorde <ahcorde@gmail.com> * Removed extra line Signed-off-by: ahcorde <ahcorde@gmail.com>
Related to this https://ci.ros2.org/job/nightly_linux_coverage/lastBuild/cobertura/src_ros2_rclcpp_rclcpp_lifecycle_src/lifecycle_node_cpp/lifecycle_node_cpp/
Signed-off-by: ahcorde ahcorde@gmail.com