-
Notifications
You must be signed in to change notification settings - Fork 522
Closed
Description
Bug report
Required Info:
- Operating System:
- Ubuntu22.04
- Installation type:
- source
- Version or commit hash:
- DDS implementation:
- Fast-RTPS
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
add test case in https://github.com/ros2/rclcpp/blob/edbfe1404b24d0bc85ff88e8ff1f006670788e46/rclcpp/test/rclcpp/test_node.cpp
diff --git a/rclcpp/test/rclcpp/test_node.cpp b/rclcpp/test/rclcpp/test_node.cpp
index c40811a4..2ccbdfd8 100644
--- a/rclcpp/test/rclcpp/test_node.cpp
+++ b/rclcpp/test/rclcpp/test_node.cpp
@@ -3346,6 +3346,9 @@ TEST_F(TestNode, static_and_dynamic_typing) {
EXPECT_THROW(
node->get_parameter("integer_override_not_given"),
rclcpp::exceptions::ParameterUninitializedException);
+ EXPECT_THROW(
+ node->get_parameters({"integer_override_not_given"}),
+ rclcpp::exceptions::ParameterUninitializedException);
}
{
auto param = node->declare_parameter("integer_set_after_declare", rclcpp::PARAMETER_INTEGER);
NOTE: refer to rclpy
Expected behavior
test case passed
Actual behavior
failed with log
[ RUN ] TestNode.static_and_dynamic_typing
/home/chenlh/Projects/ROS2/ros2-master/src/ros2/rclcpp/rclcpp/test/rclcpp/test_node.cpp:3349: Failure
Expected: node->get_parameters({"integer_override_not_given"}) throws an exception of type rclcpp::exceptions::ParameterUninitializedException.
Actual: it throws nothing.
[ FAILED ] TestNode.static_and_dynamic_typing (20 ms)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels