chia7712 commented on code in PR #15679:
URL: https://github.com/apache/kafka/pull/15679#discussion_r1574810225


##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/DeleteOffsetsConsumerGroupCommandIntegrationTest.java:
##########
@@ -42,75 +53,98 @@
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 
-public class DeleteOffsetsConsumerGroupCommandIntegrationTest extends 
ConsumerGroupCommandTest {
-    String[] getArgs(String group, String topic) {
-        return new String[] {
-            "--bootstrap-server", bootstrapServers(listenerName()),
-            "--delete-offsets",
-            "--group", group,
-            "--topic", topic
-        };
+@Tag("integration")
+@ClusterTestDefaults(clusterType = Type.ALL, brokers = 3, serverProperties = {

Review Comment:
   Could we reduce the replica number instead of increasing number of brokers? 
I try to avoid our CI get burned :)



##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/DeleteOffsetsConsumerGroupCommandIntegrationTest.java:
##########
@@ -213,4 +246,9 @@ private Consumer<byte[], byte[]> createConsumer(Properties 
config) {
 
         return new KafkaConsumer<>(config);
     }
+
+    private void createTopic(String topic) {
+        Assertions.assertDoesNotThrow(() ->
+            
clusterInstance.createAdminClient().createTopics(Collections.singletonList(new 
NewTopic(topic, 1, (short) 1))).topicId(topic).get());

Review Comment:
   Could we use try-with-resource to close `Admin`? We don't guarantee that 
`createAdminClient` will auto-release the admin currently. I have filed 
https://issues.apache.org/jira/browse/KAFKA-16589 to discuss it. However, we 
should always close it.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to