deepgolani4 commented on code in PR #20540:
URL: https://github.com/apache/kafka/pull/20540#discussion_r2386354501


##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/AdjustStreamThreadCountTest.java:
##########
@@ -141,20 +141,18 @@ public void setup(final TestInfo testInfo) {
 
     private void produceTestRecords(final String inputTopic, final 
EmbeddedKafkaCluster cluster) {
         final Properties props = new Properties();
-        props.put("acks", "all");
-        props.put("retries", 1);
         props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, 
cluster.bootstrapServers());
         props.put(ProducerConfig.CLIENT_ID_CONFIG, "test-client");
         props.put("key.serializer", 
"org.apache.kafka.common.serialization.StringSerializer");
         props.put("value.serializer", 
"org.apache.kafka.common.serialization.StringSerializer");
-        final KafkaProducer<String, String> dummyProducer = new 
KafkaProducer<>(props);
-        for (int i = 0; i < 5000; i++) {
-            final String key = "key-" + (i % 50);
-            final String value = "value-" + i;
-            dummyProducer.send(new ProducerRecord<String, String>(inputTopic, 
key, value));
-        }
-        dummyProducer.flush();
-        dummyProducer.close();
+        try (KafkaProducer<String, String> dummyProducer = new 
KafkaProducer<>(props)) {

Review Comment:
   ack, renamed to producer for clarity.



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