Skip to content

Commit

Permalink
Fixes from review.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Oct 13, 2023
1 parent 41d5583 commit 0eaf242
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand All @@ -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.
Expand Down

0 comments on commit 0eaf242

Please sign in to comment.