showuon edited a comment on pull request #8894: URL: https://github.com/apache/kafka/pull/8894#issuecomment-646406717
@ryannedolan @skaundinya15 , thanks for your good suggestion. Yes, what I did to add retries is the same as increasing the timeout value. And I found the `waitForCondition` is not good in this case, because the `consume` method in `EmbeddedKafkaCluster.java` will not return the consumeRecords to let us increment the partial consumeRecords if it can't consume the expected records size in time. Instead, it'll throw exception directly. In other words, `comsume` method is already doing a `waitForCondition` job. So, what we need to do is just to **increase the timeout value** to give the MM2 replication more time. It should make this test more stable. Thank you. ---------------------------------------------------------------- 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: us...@infra.apache.org