public Set<String> getAllTopicsInCluster() {
        final scala.collection.Iterator<String> topicsIterator = brokers[0].kafkaServer().zkClient().getAllTopicsInCluster(false).iterator();
        final Set<String> topics = new HashSet<>();
        while (topicsIterator.hasNext()) {
            topics.add(topicsIterator.next());
        }
        return topics;
    }
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