Conversation
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
fujitatomoya
left a comment
There was a problem hiding this comment.
lgtm with green CI
|
Pulls: #2877 |
|
@jmachowinski Adding your last feedback the |
|
That's odd, this would mean rcl does not set the error correctly, is this the reason why the TODOs were there in the first place ? |
|
I am deeply confused https://github.com/ros2/rcutils/blob/697ebd943c3438ffb9f20b64d07d1c9654a4c8d1/src/string_array.c#L68C5-L68C26 |
|
Ahh figured it out, this happens because the test mocks and fails rcutils_string_array_fini I guess we need to patch the test case as well and use patch_to_fail instead of patch_and_return TEST_F(TestNodeGraph, get_node_names_and_namespaces_fini_errors)
{
auto mock_names_fini = mocking_utils::patch_to_fail(
"lib:rclcpp", rcutils_string_array_fini, "string_array is null", RCL_RET_ERROR);
RCLCPP_EXPECT_THROW_EQ(
node_graph()->get_node_names_and_namespaces(),
std::runtime_error("could not destroy node names, could not destroy node namespaces : string_array is null"));
} |
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
Adressed TODO in node_graph