cmccabe commented on code in PR #13116:
URL: https://github.com/apache/kafka/pull/13116#discussion_r1127191979


##########
core/src/test/scala/unit/kafka/utils/TestUtils.scala:
##########
@@ -378,6 +378,118 @@ object TestUtils extends Logging {
     props
   }
 
+  def createCombinedControllerConfig(nodeId: Int,
+                                     enableControlledShutdown: Boolean = true,
+                                     enableDeleteTopic: Boolean = true,
+                                     port: Int = RandomPort,
+                                     interBrokerSecurityProtocol: 
Option[SecurityProtocol] = None,
+                                     trustStoreFile: Option[File] = None,
+                                     saslProperties: Option[Properties] = None,
+                                     enablePlaintext: Boolean = true,
+                                     enableSaslPlaintext: Boolean = false,
+                                     saslPlaintextPort: Int = RandomPort,
+                                     enableSsl: Boolean = false,
+                                     sslPort: Int = RandomPort,
+                                     enableSaslSsl: Boolean = false,
+                                     saslSslPort: Int = RandomPort,
+                                     rack: Option[String] = None,
+                                     logDirCount: Int = 1,
+                                     enableToken: Boolean = false,
+                                     numPartitions: Int = 1,
+                                     defaultReplicationFactor: Short = 1,
+                                     enableFetchFromFollower: Boolean = 
false): Properties = {
+    val retval = createBrokerConfig(nodeId,
+      zkConnect = null,
+      enableControlledShutdown,
+      enableDeleteTopic,
+      port,
+      interBrokerSecurityProtocol,
+      trustStoreFile,
+      saslProperties,
+      enablePlaintext,
+      enableSaslPlaintext,
+      saslPlaintextPort,
+      enableSsl,
+      sslPort,
+      enableSaslSsl,
+      saslSslPort,
+      rack,
+      logDirCount,
+      enableToken,
+      numPartitions,
+      defaultReplicationFactor,
+      enableFetchFromFollower,
+    )
+    retval.put(KafkaConfig.ProcessRolesProp, "broker,controller")
+    retval.put(KafkaConfig.ControllerListenerNamesProp, "CONTROLLER")
+    retval.put(KafkaConfig.ListenersProp, 
s"${retval.get(KafkaConfig.ListenersProp)},CONTROLLER://localhost:0")
+    retval.put(KafkaConfig.QuorumVotersProp, s"${nodeId}@localhost:0")
+    retval
+  }
+
+  def createIsolatedControllerConfig(nodeId: Int,

Review Comment:
   Same question as above, why not just a boolean on `createBrokerConfig`?
   
   `combinedMode: Boolean = false` or similar



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