You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2023/01/12 09:30:37 UTC

[GitHub] [kafka] clolov commented on a diff in pull request #13094: MINOR: Various cleanups in client tests

clolov commented on code in PR #13094:
URL: https://github.com/apache/kafka/pull/13094#discussion_r1067891312


##########
clients/src/test/java/org/apache/kafka/clients/producer/internals/RecordAccumulatorTest.java:
##########
@@ -331,17 +331,15 @@ public void testStressfulSituation() throws Exception {
             1024 + DefaultRecordBatch.RECORD_BATCH_OVERHEAD, 10 * 1024, CompressionType.NONE, 0);
         List<Thread> threads = new ArrayList<>();
         for (int i = 0; i < numThreads; i++) {
-            threads.add(new Thread() {
-                public void run() {
-                    for (int i = 0; i < msgs; i++) {
-                        try {
-                            accum.append(topic, i % numParts, 0L, key, value, Record.EMPTY_HEADERS, null, maxBlockTimeMs, false, time.milliseconds(), cluster);
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        }
+            threads.add(new Thread(() -> {
+                for (int i1 = 0; i1 < msgs; i1++) {

Review Comment:
   Nit: Does this need to be `i1` - are we iterating through the same types of things as `i` is iterating through? Can we leave it as `i` similar to the previous version or change it to `j` (or something similar)?



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org