From ed901a7b120d866bd19685955c7b7a969079c5f0 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Fri, 13 Oct 2023 12:32:42 +0000 Subject: [PATCH] Fixes from review. Signed-off-by: Chris Lalancette --- .../rclcpp/strategies/message_pool_memory_strategy.hpp | 2 +- .../rclcpp/strategies/test_message_pool_memory_strategy.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rclcpp/include/rclcpp/strategies/message_pool_memory_strategy.hpp b/rclcpp/include/rclcpp/strategies/message_pool_memory_strategy.hpp index 82f9cbc6f0..e4cfbb2be0 100644 --- a/rclcpp/include/rclcpp/strategies/message_pool_memory_strategy.hpp +++ b/rclcpp/include/rclcpp/strategies/message_pool_memory_strategy.hpp @@ -80,7 +80,7 @@ class MessagePoolMemoryStrategy } } if (free_list_.size() == 0) { - throw std::runtime_error("No more free slots in the pool!"); + throw std::runtime_error("No more free slots in the pool"); } } diff --git a/rclcpp/test/rclcpp/strategies/test_message_pool_memory_strategy.cpp b/rclcpp/test/rclcpp/strategies/test_message_pool_memory_strategy.cpp index e615052509..69198adf59 100644 --- a/rclcpp/test/rclcpp/strategies/test_message_pool_memory_strategy.cpp +++ b/rclcpp/test/rclcpp/strategies/test_message_pool_memory_strategy.cpp @@ -56,7 +56,7 @@ TEST_F(TestMessagePoolMemoryStrategy, borrow_too_many) { // Size is 1, borrowing second time should fail RCLCPP_EXPECT_THROW_EQ( message_memory_strategy_->borrow_message(), - std::runtime_error("No more free slots in the pool!")); + std::runtime_error("No more free slots in the pool")); EXPECT_NO_THROW(message_memory_strategy_->return_message(message)); } @@ -71,7 +71,7 @@ TEST_F(TestMessagePoolMemoryStrategy, borrow_hold_reference) { // But we are still holding the reference, so we expect that there is still no room in the pool. RCLCPP_EXPECT_THROW_EQ( message_memory_strategy_->borrow_message(), - std::runtime_error("No more free slots in the pool!")); + std::runtime_error("No more free slots in the pool")); } // Now that we've dropped the reference (left the scope), we expect to be able to borrow again.