pnowojski 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_r338067349
##########
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:
Decreasing this from 10s to 1s might decrease the chance for the test do
detect committing/flushing failures. However 1s should still be enough on at
least some of the travis builds to detect it.
Also, are those config adjustments related to " Fix the cascading failure in
KafkaProducerTestBase"? If some of them are about speeding up the test, it
should be a separate commit.
----------------------------------------------------------------
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