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


##########
core/src/test/java/kafka/test/junit/ClusterTestExtensions.java:
##########
@@ -179,8 +186,8 @@ private void processClusterTest(ExtensionContext context, 
ClusterTest annot, Clu
                 throw new IllegalStateException();
         }
 
-        ClusterConfig.Builder builder = ClusterConfig.clusterBuilder(type, 
brokers, controllers, autoStart,
-            annot.securityProtocol(), annot.metadataVersion());
+        ClusterConfig.Builder builder = ClusterConfig.clusterBuilder(type, 
brokers, controllers, disksPerBroker,

Review Comment:
   It seems to me `clusterBuilder` should be removed. Also, the temporary local 
variables (`type`, `brokers`, etc ) can be removed. We have a builder already 
and hence we should leverage it to collect all variables. for example:
   ```java
           ClusterConfig.Builder builder = ClusterConfig.builder();
           if (annot.clusterType() == Type.DEFAULT) {
               builder.type(defaults.clusterType());
           } else {
               builder.type(annot.clusterType());
           }
   ```



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