Browse Source

MINOR: Increase produce timeout to 120 seconds (#6326)

MINOR: Increase produce timeout for EmbeddedKafkaCluster to 120 seconds

Previous value was 500ms. This change gives more room to pass tests on systems with low resources running many parallel tests.

Reviewers: Randall Hauch <randall@confluent.io>
pull/6330/head
Arjun Satish 6 years ago committed by Randall Hauch
parent
commit
2627a1be2c
  1. 4
      connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedKafkaCluster.java

4
connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedKafkaCluster.java

@ -75,7 +75,7 @@ public class EmbeddedKafkaCluster extends ExternalResource { @@ -75,7 +75,7 @@ public class EmbeddedKafkaCluster extends ExternalResource {
private static final Logger log = LoggerFactory.getLogger(EmbeddedKafkaCluster.class);
private static final long DEFAULT_PRODUCE_SEND_DURATION_MS = 500;
private static final long DEFAULT_PRODUCE_SEND_DURATION_MS = TimeUnit.SECONDS.toMillis(120);
// Kafka Config
private final KafkaServer[] brokers;
@ -254,7 +254,7 @@ public class EmbeddedKafkaCluster extends ExternalResource { @@ -254,7 +254,7 @@ public class EmbeddedKafkaCluster extends ExternalResource {
try {
producer.send(msg).get(DEFAULT_PRODUCE_SEND_DURATION_MS, TimeUnit.MILLISECONDS);
} catch (Exception e) {
throw new KafkaException("Could not produce message to topic=" + topic, e);
throw new KafkaException("Could not produce message: " + msg, e);
}
}

Loading…
Cancel
Save