chia7712 commented on code in PR #15821: URL: https://github.com/apache/kafka/pull/15821#discussion_r1619254777
########## tools/src/test/java/org/apache/kafka/tools/consumer/group/ConsumerGroupCommandTestUtils.java: ########## @@ -50,14 +51,13 @@ class ConsumerGroupCommandTestUtils { private ConsumerGroupCommandTestUtils() { } - static List<ClusterConfig> generator() { + static List<ClusterConfig> generator(boolean onlyConsumerGroupCoordinator) { Review Comment: Could we avoid using single `boolean` argument? That is not readable. We can do a bit refactor: ```java static List<ClusterConfig> generator() { return Stream.concat(forConsumerGroupCoordinator().stream(), forClassicGroupCoordinator().stream()) .collect(Collectors.toList()); } static List<ClusterConfig> forConsumerGroupCoordinator() { Map<String, String> serverProperties = new HashMap<>(); serverProperties.put(OFFSETS_TOPIC_PARTITIONS_CONFIG, "1"); serverProperties.put(OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG, "1"); serverProperties.put(NEW_GROUP_COORDINATOR_ENABLE_CONFIG, "true"); return Collections.singletonList(ClusterConfig.defaultBuilder() .setTypes(Stream.of(KRAFT, CO_KRAFT).collect(Collectors.toSet())) .setServerProperties(serverProperties) .setTags(Collections.singletonList("consumerGroupCoordinator")) .build()); } static List<ClusterConfig> forClassicGroupCoordinator() { Map<String, String> serverProperties = new HashMap<>(); serverProperties.put(OFFSETS_TOPIC_PARTITIONS_CONFIG, "1"); serverProperties.put(OFFSETS_TOPIC_REPLICATION_FACTOR_CONFIG, "1"); serverProperties.put(NEW_GROUP_COORDINATOR_ENABLE_CONFIG, "false"); return Collections.singletonList(ClusterConfig.defaultBuilder() .setServerProperties(serverProperties) .setTags(Collections.singletonList("classicGroupCoordinator")) .build()); } ``` -- 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