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


##########
clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java:
##########
@@ -397,7 +397,7 @@ public void testStressfulSituation() throws Exception {
             List<ProducerBatch> batches = accum.drain(metadataCache, nodes, 5 
* 1024, 0).get(node1.id());
             if (batches != null) {
                 for (ProducerBatch batch : batches) {
-                    for (Record record : batch.records().records())
+                    for (@SuppressWarnings("UnusedLocalVariable") Record 
ignored : batch.records().records())
                         read++;

Review Comment:
   I think the point of the test is actually simulating consumption of the 
batch in a scenario where multiple threads append to the accumulator. So we 
want to actually access the `MemoryRecords`, not just test the record counter. 



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