public void deleteAllTopicsAndWait(final long timeoutMs) throws InterruptedException {
        final Set<String> topics = getAllTopicsInCluster();
        for (final String topic : topics) {
            try {
                brokers[0].deleteTopic(topic);
            } catch (final UnknownTopicOrPartitionException ignored) { }
        }

        if (timeoutMs > 0) {
            TestUtils.waitForCondition(new TopicsDeletedCondition(topics), timeoutMs, "Topics not deleted after " + timeoutMs + " milli seconds.");
        }
    }
Deletes all topics and blocks until all topics got deleted.

@param timeoutMs the max time to wait for the topics to be deleted (does not block if {@code <= 0})
streams/src/test/java/org/apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java