diff --git a/rclcpp/test/rclcpp/test_publisher.cpp b/rclcpp/test/rclcpp/test_publisher.cpp index bf02958990..5f0712fddc 100644 --- a/rclcpp/test/rclcpp/test_publisher.cpp +++ b/rclcpp/test/rclcpp/test_publisher.cpp @@ -506,6 +506,6 @@ TEST_F(TestPublisher, run_event_handlers) { for (const auto & handler : publisher->get_event_handlers()) { std::shared_ptr data = handler->take_data(); - EXPECT_THROW(handler->execute(data), std::runtime_error); + handler->execute(data); } }