mimaison commented on code in PR #15225:
URL: https://github.com/apache/kafka/pull/15225#discussion_r1476307322


##########
core/src/test/scala/unit/kafka/utils/TestUtils.scala:
##########
@@ -559,6 +559,31 @@ object TestUtils extends Logging {
     controllers.foreach(controller => ensureConsistentKRaftMetadata(brokers, 
controller))
   }
 
+  /**
+   * Create a topic
+   * If zkClient exists, create a topic in Zookeeper.
+   * Otherwise, create a topic using the Admin Client.
+   */
+  def createTopicWithAssignment(topic: String,

Review Comment:
   Could we reuse `createTopicWithAdmin()` instead of creating a new method? 
It's fine to use the Admin client to create the topic even in ZK mode.



##########
core/src/test/scala/unit/kafka/server/epoch/LeaderEpochIntegrationTest.scala:
##########
@@ -142,17 +143,20 @@ class LeaderEpochIntegrationTest extends 
QuorumTestHarness with Logging {
     fetcher1.close()
   }
 
-  @Test
-  def shouldIncreaseLeaderEpochBetweenLeaderRestarts(): Unit = {
+  @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumName)
+  @ValueSource(strings = Array("zk", "kraft"))
+  def shouldIncreaseLeaderEpochBetweenLeaderRestarts(quorum: String): Unit = {
     //Setup: we are only interested in the single partition on broker 101
-    brokers += createServer(fromProps(createBrokerConfig(100, zkConnect)))
-    assertEquals(100, TestUtils.waitUntilControllerElected(zkClient))
+    brokers += createBroker(fromProps(createBrokerConfig(100, 
zkConnectOrNull)))
+    if (!isKRaftTest()) {

Review Comment:
   Can we have a similar assertion in KRaft mode?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to