FrankYang0529 commented on code in PR #15802: URL: https://github.com/apache/kafka/pull/15802#discussion_r1580755873
########## tools/src/test/java/org/apache/kafka/tools/consumer/group/DeleteOffsetsConsumerGroupCommandIntegrationTest.java: ########## @@ -91,65 +91,97 @@ public void testDeleteOffsetsNonExistingGroup() { @ClusterTest public void testDeleteOffsetsOfStableConsumerGroupWithTopicPartition() { - for (Map<String, Object> consumerConfig : consumerConfigs) { - createTopic(TOPIC); - testWithConsumerGroup(TOPIC, 0, 0, Errors.GROUP_SUBSCRIBED_TO_TOPIC, true, consumerConfig); - removeTopic(TOPIC); + int idx = 0; + for (Iterator<Map<String, Object>> it = consumerConfigs.iterator(); it.hasNext(); idx++) { + Map<String, Object> consumerConfig = it.next(); + String topic = TOPIC_PREFIX + idx; + String group = GROUP_PREFIX + idx; + createTopic(topic); + testWithConsumerGroup(topic, topic, group, 0, 0, Errors.GROUP_SUBSCRIBED_TO_TOPIC, true, consumerConfig); + removeTopic(topic); } } @ClusterTest public void testDeleteOffsetsOfStableConsumerGroupWithTopicOnly() { - for (Map<String, Object> consumerConfig : consumerConfigs) { - createTopic(TOPIC); - testWithConsumerGroup(TOPIC, -1, 0, Errors.GROUP_SUBSCRIBED_TO_TOPIC, true, consumerConfig); - removeTopic(TOPIC); + int idx = 0; + for (Iterator<Map<String, Object>> it = consumerConfigs.iterator(); it.hasNext(); idx++) { + Map<String, Object> consumerConfig = it.next(); + String topic = TOPIC_PREFIX + idx; Review Comment: Yes, thanks for the suggestion. Updated 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