kowshik commented on a change in pull request #9001:
URL: https://github.com/apache/kafka/pull/9001#discussion_r499847021
##########
File path:
core/src/test/scala/unit/kafka/controller/ControllerIntegrationTest.scala
##########
@@ -715,7 +747,58 @@ class ControllerIntegrationTest extends
ZooKeeperTestHarness {
doAnswer((_: InvocationOnMock) => {
latch.countDown()
}).doCallRealMethod().when(spyThread).awaitShutdown()
- controller.shutdown()
+ controller.shutdown()
+ }
+
+ private def testControllerFeatureZNodeSetup(initialZNode:
Option[FeatureZNode],
+ interBrokerProtocolVersion:
ApiVersion): Unit = {
+ val versionBeforeOpt = initialZNode match {
+ case Some(node) =>
+ zkClient.createFeatureZNode(node)
+ Some(zkClient.getDataAndVersion(FeatureZNode.path)._2)
+ case None =>
+ Option.empty
+ }
+ servers = makeServers(1, interBrokerProtocolVersion =
Some(interBrokerProtocolVersion))
+ TestUtils.waitUntilControllerElected(zkClient)
Review comment:
Done. Please take a look at the fix. I've added logic to wait for
processing on a dummy event just after waiting for controller election. I'm
hoping this will make sure the controller failover logic is completed before
the test proceeds further to make assertions.
----------------------------------------------------------------
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:
[email protected]