From e2836303d65a3bbf3ccd2d07ed2b8c5f94a81294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 30 Sep 2020 17:36:14 +0200 Subject: [PATCH] Improved test publisher - zero qos history depth value exception (#1360) Signed-off-by: ahcorde --- rclcpp/test/rclcpp/test_publisher.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rclcpp/test/rclcpp/test_publisher.cpp b/rclcpp/test/rclcpp/test_publisher.cpp index 01a1ee2fde..eebf34ddef 100644 --- a/rclcpp/test/rclcpp/test_publisher.cpp +++ b/rclcpp/test/rclcpp/test_publisher.cpp @@ -375,6 +375,11 @@ TEST_F(TestPublisher, intra_process_publish_failures) { publisher->publish(std::move(loaned_msg)), std::runtime_error("loaned message is not valid")); } + RCLCPP_EXPECT_THROW_EQ( + node->create_publisher( + "topic", rclcpp::QoS(0), options), + std::invalid_argument( + "intraprocess communication is not allowed with a zero qos history depth value")); } TEST_F(TestPublisher, inter_process_publish_failures) {