g1geordie commented on a change in pull request #9707: URL: https://github.com/apache/kafka/pull/9707#discussion_r539869906
########## File path: clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java ########## @@ -131,6 +131,14 @@ Collections.singletonList(new PartitionInfo(topic, 0, null, null, null)), Collections.emptySet(), Collections.emptySet()); + + private final Cluster oneLeaderCluster = new Cluster( Review comment: producer.close(Duration.of(0)) will force close without sending all message . producer.close() will gracefully close after sending all message . the callback method will be invoke after one of above does when we want to send message , we need to have - A Cluster has a leader partition - Mockclient prepare a fake response So I add a cluster with one leader ---------------------------------------------------------------- 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