showuon commented on a change in pull request #10872:
URL: https://github.com/apache/kafka/pull/10872#discussion_r652329369



##########
File path: 
connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedKafkaCluster.java
##########
@@ -123,24 +123,23 @@ public void start() {
     }
 
     private void start(int[] brokerPorts, String[] logDirs) {
-        brokerConfig.put(KafkaConfig$.MODULE$.ZkConnectProp(), 
zKConnectString());
+        brokerConfig.put(KafkaConfig.ZkConnectProp(), zKConnectString());
 
-        putIfAbsent(brokerConfig, KafkaConfig$.MODULE$.HostNameProp(), 
"localhost");
-        putIfAbsent(brokerConfig, 
KafkaConfig$.MODULE$.DeleteTopicEnableProp(), true);
-        putIfAbsent(brokerConfig, 
KafkaConfig$.MODULE$.GroupInitialRebalanceDelayMsProp(), 0);
-        putIfAbsent(brokerConfig, 
KafkaConfig$.MODULE$.OffsetsTopicReplicationFactorProp(), (short) 
brokers.length);
-        putIfAbsent(brokerConfig, 
KafkaConfig$.MODULE$.AutoCreateTopicsEnableProp(), false);
+        putIfAbsent(brokerConfig, KafkaConfig.DeleteTopicEnableProp(), true);
+        putIfAbsent(brokerConfig, 
KafkaConfig.GroupInitialRebalanceDelayMsProp(), 0);
+        putIfAbsent(brokerConfig, 
KafkaConfig.OffsetsTopicReplicationFactorProp(), (short) brokers.length);
+        putIfAbsent(brokerConfig, KafkaConfig.AutoCreateTopicsEnableProp(), 
false);
 
-        Object listenerConfig = 
brokerConfig.get(KafkaConfig$.MODULE$.InterBrokerListenerNameProp());
+        Object listenerConfig = 
brokerConfig.get(KafkaConfig.InterBrokerListenerNameProp());
         if (listenerConfig != null) {
             listenerName = new ListenerName(listenerConfig.toString());
         }
 
         for (int i = 0; i < brokers.length; i++) {
-            brokerConfig.put(KafkaConfig$.MODULE$.BrokerIdProp(), i);
+            brokerConfig.put(KafkaConfig.BrokerIdProp(), i);
             currentBrokerLogDirs[i] = logDirs[i] == null ? createLogDir() : 
currentBrokerLogDirs[i];
-            brokerConfig.put(KafkaConfig$.MODULE$.LogDirProp(), 
currentBrokerLogDirs[i]);
-            brokerConfig.put(KafkaConfig$.MODULE$.PortProp(), brokerPorts[i]);
+            brokerConfig.put(KafkaConfig.LogDirProp(), 
currentBrokerLogDirs[i]);
+            putIfAbsent(brokerConfig, KafkaConfig.ListenersProp(), 
"PLAINTEXT://localhost:" + brokerPorts[i]);

Review comment:
       This method is what I'm referring to:
   ```
   /**
        * Starts the Kafka cluster alone using the ports that were assigned 
during initialization of
        * the harness.
        *
        * @throws ConnectException if a directory to store the data cannot be 
created
        */
       public void startOnlyKafkaOnSamePorts() {
           start(currentBrokerPorts, currentBrokerLogDirs);
       }
   ```




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to