becketqin commented on a change in pull request #9912: 
[FLINK-14370][kafka][test-stability] Fix the cascading failure in 
kaProducerTestBase.
URL: https://github.com/apache/flink/pull/9912#discussion_r339294614
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaProducerTestBase.java
 ##########
 @@ -243,10 +243,14 @@ protected void testOneToOneAtLeastOnce(boolean 
regularSink) throws Exception {
                properties.putAll(secureProps);
                // decrease timeout and block time from 60s down to 10s - this 
is how long KafkaProducer will try send pending (not flushed) data on close()
                properties.setProperty("timeout.ms", "10000");
+               // KafkaProducer prior to KIP-91 (release 2.1) uses request 
timeout to expire the unsent records.
+               properties.setProperty("request.timeout.ms", "3000");
+               // KafkaProducer in 2.1.0 and above uses delivery timeout to 
expire the the records.
+               properties.setProperty("delivery.timeout.ms", "5000");
                properties.setProperty("max.block.ms", "10000");
                // increase batch.size and linger.ms - this tells KafkaProducer 
to batch produced events instead of flushing them immediately
                properties.setProperty("batch.size", "10240000");
-               properties.setProperty("linger.ms", "10000");
+               properties.setProperty("linger.ms", "1000");
 
 Review comment:
   We can leave this at 10 seconds. I don't think this would matter much.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to