Skip to content

Commit

Permalink
Improved test publisher - zero qos history depth value exception (#1360)
Browse files Browse the repository at this point in the history
Signed-off-by: ahcorde <ahcorde@gmail.com>
  • Loading branch information
ahcorde authored and brawner committed Oct 9, 2020
1 parent 39a9d1d commit e283630
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rclcpp/test/rclcpp/test_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<test_msgs::msg::Empty>(
"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) {
Expand Down

0 comments on commit e283630

Please sign in to comment.