junrao commented on code in PR #20121: URL: https://github.com/apache/kafka/pull/20121#discussion_r2198952441
########## core/src/test/scala/unit/kafka/server/LogRecoveryTest.scala: ########## @@ -215,7 +215,7 @@ class LogRecoveryTest extends QuorumTestHarness { server2.startup() updateProducer() // check if leader moves to the other server - leader = awaitLeaderChange(servers, topicPartition, oldLeaderOpt = Some(leader), timeout = 30000L) + leader = awaitLeaderChange(Seq(server2), topicPartition, oldLeaderOpt = Some(leader), timeout = 30000L) Review Comment: @karuturi : I added the following to the test. It seems that fixes the issue. I was able to run the test for 400 iterations with no failure. Before, the test will fail within 50 iterations. Do you want to include that in your PR? ``` override def kraftControllerConfigs(testInfo: TestInfo): Seq[Properties] = { val properties = new Properties() properties.put(ReplicationConfigs.UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG, "true") Seq(properties) } ``` -- 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