Thanks for the update! It seems that the approach before this PR will also retry producer.send(..) until metadata is refreshed. We can just add `producer.send(record).get(6000, TimeUnit.MILLISECONDS)` after `TestUtils.waitUntilTrue(//send message)` (line 182) and before consuming messages. This approach seems a bit simpler since it adds only 1 line. Do you think that is better?
Otherwise LGTM if you like the existing approach in this PR. If so, can you address comments from @dhruvilshah3? [ Full content available at: https://github.com/apache/kafka/pull/5695 ] This message was relayed via gitbox.apache.org for devnull@infra.apache.org