Yunyung commented on code in PR #20235:
URL: https://github.com/apache/kafka/pull/20235#discussion_r2228715330


##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/ResetConsumerGroupOffsetTest.java:
##########
@@ -153,6 +154,30 @@ public void 
testResetOffsetsNotExistingGroup(ClusterInstance cluster) throws Exc
         }
     }
 
+    @ClusterTest(
+        brokers = 3,
+        serverProperties = {
+            @ClusterConfigProperty(key = 
OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG, value = "2")
+        }
+    )
+    public void 
testResetOffsetsWithOfflinePartitionNotInResetTarget(ClusterInstance cluster) 
throws Exception {
+        String topic = generateRandomTopic();
+        String group = "new.group";
+        String[] args = buildArgsForGroup(cluster, group, "--to-earliest", 
"--execute", "--topic", topic + ":0");
+
+        try (Admin admin = cluster.admin(); 
ConsumerGroupCommand.ConsumerGroupService service = 
getConsumerGroupService(args)) {
+            admin.createTopics(List.of(new NewTopic(topic, Map.of(0, 
List.of(0), 1, List.of(1)))));
+            cluster.waitTopicCreation(topic, 2);
+
+            cluster.shutdownBroker(1);
+            TestUtils.waitForCondition(() -> 
!cluster.aliveBrokers().containsKey(1),

Review Comment:
   According to https://github.com/apache/kafka/pull/20168/files#r2228677312, I 
understand that shutdown() already waits until the shutdown is complete. So 
this can be removed as well.



-- 
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