dengziming commented on a change in pull request #18656:
URL: https://github.com/apache/flink/pull/18656#discussion_r805931388



##########
File path: 
flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaTestEnvironmentImpl.java
##########
@@ -184,12 +147,14 @@ private void tryDelete(AdminClient adminClient, String 
topic) throws Exception {
                     .deleteTopics(Collections.singleton(topic))
                     .all()
                     .get(DELETE_TIMEOUT_SECONDS, TimeUnit.SECONDS);
-
-            for (KafkaServer kafkaServer : brokers) {
+            try (KafkaConsumer<Void, Void> consumer = createTempConsumer()) {

Review comment:
       It's better to use AdminClient rather KafkaConsumer if we only want to 
get offsets.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to