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


##########
core/src/test/java/kafka/test/ClusterConfig.java:
##########
@@ -55,14 +56,21 @@ public class ClusterConfig {
     private final Map<Integer, Map<String, String>> 
perBrokerOverrideProperties;
 
     @SuppressWarnings("checkstyle:ParameterNumber")
-    private ClusterConfig(Type type, int brokers, int controllers, String 
name, boolean autoStart,
+    private ClusterConfig(Type type, int brokers, int controllers, int 
disksPerBroker, String name, boolean autoStart,
                   SecurityProtocol securityProtocol, String listenerName, File 
trustStoreFile,
                   MetadataVersion metadataVersion, Map<String, String> 
serverProperties, Map<String, String> producerProperties,
                   Map<String, String> consumerProperties, Map<String, String> 
adminClientProperties, Map<String, String> saslServerProperties,
                   Map<String, String> saslClientProperties, Map<Integer, 
Map<String, String>> perBrokerOverrideProperties) {
+        if (brokers < 0) {
+            throw new IllegalArgumentException("Number of brokers must be 
greater or equal to zero.");
+        }
+        if (controllers <= 0 || disksPerBroker <= 0) {

Review Comment:
   `controllers <= 0` is acceptable if it is zk mode. Also, `TestKitNodes` 
guards against that already
   
   
https://github.com/apache/kafka/blob/89d8045a15b622805f65c3c6fbfde82606921f65/core/src/test/java/kafka/testkit/TestKitNodes.java#L90
   
   Hence, `ClusterConfig` does not require such check, and we can add comment 
to explain why we don't need to check `controllers` here.



##########
core/src/test/java/kafka/test/ClusterTestExtensionsTest.java:
##########
@@ -104,6 +107,26 @@ public void testClusterTests() {
         }
     }
 
+    @ClusterTests({
+        @ClusterTest(clusterType = Type.ZK),

Review Comment:
   We should test all types for both cases: "default" + "custom"



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