lucasbru commented on code in PR #14193:
URL: https://github.com/apache/kafka/pull/14193#discussion_r1360187606


##########
clients/src/main/java/org/apache/kafka/clients/producer/MockProducer.java:
##########
@@ -361,7 +369,7 @@ private long nextOffset(TopicPartition tp) {
     }
 
     public synchronized void flush() {
-        verifyProducerState();
+        verifyNotClosed();

Review Comment:
   If you look at the implementation of the real `flush`, it actually never 
throws a `ProducerFencedException`. So `StreamsProducer.flush` also doesn't 
convert the `ProducerFencedException` to a `TaskMigratedException`. This 
incorrect mock was causing `ProducerFencedException` to be surfaced inside 
streams code.



-- 
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

Reply via email to