diff --git a/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala b/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala index f8c977d429d..dd1ae064f12 100644 --- a/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala +++ b/core/src/test/scala/integration/kafka/server/FetchFromFollowerIntegrationTest.scala @@ -67,6 +67,7 @@ class FetchFromFollowerIntegrationTest extends BaseFetchRequestTest { brokers, replicaAssignment = Map(0 -> Seq(leaderBrokerId, followerBrokerId)) ) + TestUtils.waitUntilLeaderIsKnown(brokers, new TopicPartition(topic, 0)) assertTrue(partitionLeaders.values.forall(_ == leaderBrokerId)) val version = ApiKeys.FETCH.latestVersion()