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


##########
core/src/test/java/kafka/test/ClusterInstance.java:
##########
@@ -145,4 +152,21 @@ default Admin createAdminClient() {
     void startBroker(int brokerId);
 
     void waitForReadyBrokers() throws InterruptedException;
+
+    default Set<GroupProtocol> supportedGroupProtocols() {

Review Comment:
   It would be great to remove unmodified collection. Also, we need to add 
comments to explain the reason of checking two configs.
   ```java
       default Set<GroupProtocol> supportedGroupProtocols() {
           Set<GroupProtocol> supportedGroupProtocols = new HashSet<>();
           supportedGroupProtocols.add(CLASSIC);
           // KafkaConfig#isNewGroupCoordinatorEnabled check both 
NEW_GROUP_COORDINATOR_ENABLE_CONFIG and 
GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG
           if 
(config().serverProperties().getOrDefault(NEW_GROUP_COORDINATOR_ENABLE_CONFIG, 
"").equals("true") ||
               
config().serverProperties().getOrDefault(GROUP_COORDINATOR_REBALANCE_PROTOCOLS_CONFIG,
 "").contains("consumer")) {
               supportedGroupProtocols.add(CONSUMER);
           }
           return Collections.unmodifiableSet(supportedGroupProtocols);
       }
   ```



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