You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ar...@apache.org on 2021/11/25 08:16:50 UTC
[flink] branch release-1.13 updated: [FLINK-21214][kafka/IT] Add retry rule for the ITCase. The issue has been solved after bumping Kafka to 2.8.1.
This is an automated email from the ASF dual-hosted git repository.
arvid pushed a commit to branch release-1.13
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.13 by this push:
new 408ba03 [FLINK-21214][kafka/IT] Add retry rule for the ITCase. The issue has been solved after bumping Kafka to 2.8.1.
408ba03 is described below
commit 408ba03902621f69b996a19af11fe9e8e8f13008
Author: Jing Ge <ge...@gmail.com>
AuthorDate: Mon Nov 22 10:23:59 2021 +0100
[FLINK-21214][kafka/IT] Add retry rule for the ITCase. The issue has been solved after bumping Kafka to 2.8.1.
---
.../streaming/connectors/kafka/FlinkKafkaProducerITCase.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerITCase.java b/flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerITCase.java
index 6392596..f932991 100644
--- a/flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerITCase.java
+++ b/flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerITCase.java
@@ -28,10 +28,13 @@ import org.apache.flink.streaming.connectors.kafka.internals.KeyedSerializationS
import org.apache.flink.streaming.util.AbstractStreamOperatorTestHarness;
import org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness;
import org.apache.flink.streaming.util.serialization.KeyedSerializationSchema;
+import org.apache.flink.testutils.junit.RetryOnFailure;
+import org.apache.flink.testutils.junit.RetryRule;
import kafka.server.KafkaServer;
import org.apache.kafka.common.errors.ProducerFencedException;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import java.util.ArrayList;
@@ -52,8 +55,13 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
/** IT cases for the {@link FlinkKafkaProducer}. */
+// This test is known to be unstable due to a known issue in Kafka.
+// It has been solved after bumping Kafka to 2.8.1 on the release 1.15
+@RetryOnFailure(times = 2)
public class FlinkKafkaProducerITCase extends KafkaTestBase {
+ @Rule public final RetryRule retryRule = new RetryRule();
+
protected String transactionalId;
protected Properties extraProperties;