junrao commented on code in PR #20285:
URL: https://github.com/apache/kafka/pull/20285#discussion_r2414621589


##########
clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java:
##########
@@ -1066,6 +1066,41 @@ public void testSplitAndReenqueue() throws 
ExecutionException, InterruptedExcept
         assertEquals(1, future2.get().offset());
     }
 
+    // here I am testing the hasRoomFor() behaviour

Review Comment:
   With the optimized approach, we could just 
   1. create an oversized batch to be split
   2. try to split the batch by calling splitAndReenqueue()
   3. verify originalBatch.produceFuture.completed() returns false



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to