diff --git a/rclcpp/test/rclcpp/test_serialized_message.cpp b/rclcpp/test/rclcpp/test_serialized_message.cpp index 0a020bb7c0..67a2d9b2be 100644 --- a/rclcpp/test/rclcpp/test_serialized_message.cpp +++ b/rclcpp/test/rclcpp/test_serialized_message.cpp @@ -145,11 +145,6 @@ TEST(TestSerializedMessage, reserve) { // Resize using reserve method serialized_msg.reserve(15); EXPECT_EQ(15u, serialized_msg.capacity()); - - // Use invalid value throws exception - EXPECT_THROW( - {serialized_msg.reserve(-1);}, - rclcpp::exceptions::RCLBadAlloc); } TEST(TestSerializedMessage, serialization) {