gharris1727 commented on code in PR #13036: URL: https://github.com/apache/kafka/pull/13036#discussion_r1055698925
########## core/src/test/scala/integration/kafka/api/TransactionsExpirationTest.scala: ########## @@ -129,9 +129,11 @@ class TransactionsExpirationTest extends KafkaServerTestHarness { producer.flush() // Ensure producer IDs are added. - val pState = producerState - assertEquals(1, pState.size) - val oldProducerId = pState(0).producerId + var pState : List[ProducerState] = null + TestUtils.waitUntilTrue(() => { pState = producerState; pState.nonEmpty}, "Producer IDs for topic1 did not propagate quickly") + assertEquals(1, pState.size, "Unexpected producer to topic1") Review Comment: The message is only printed when the state assertion fails, and the waitUntilTrue has already asserted that it is > 0. The only case that this could be true is if there are more than one producer, which the error message calls out. -- 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