mirror of
https://github.com/apache/kafka.git
synced 2026-10-28 08:24:58 +08:00
Follow-up to #23699 to apply the same changes to ClusterInstance#deleteTopic. ClusterInstance#deleteTopic did not wait for the DeleteTopics result, so a failed deletion (e.g. the topic did not exist) was either ignored or hidden by the waitTopicDeletion timeout. It now calls get() and wraps the cause in a RuntimeException, so callers no longer need to handle ExecutionException and InterruptedException. - Use ClusterInstance#deleteTopic in tests that delete a topic and then immediately wait for the deletion. - Rename ClusterTestExtensionsTest#testVerifyTopicDeletion to testDeleteTopic and verify that deleting a non-existent topic fails with UnknownTopicOrPartitionException. Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>