You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by jq...@apache.org on 2019/10/29 05:45:33 UTC

[flink] 01/02: [FLINK-14370][kafka][test-stability] Fix the cascading test failure in KafkaProducerTestBase.

This is an automated email from the ASF dual-hosted git repository.

jqin pushed a commit to branch release-1.8
in repository https://gitbox.apache.org/repos/asf/flink.git

commit cf7509b91888e4c6b64eb514fbb62af49533e0f0
Author: Jiangjie (Becket) Qin <ji...@alibaba-inc.com>
AuthorDate: Sat Oct 26 18:56:59 2019 +0800

    [FLINK-14370][kafka][test-stability] Fix the cascading test failure in KafkaProducerTestBase.
---
 .../flink/streaming/connectors/kafka/KafkaProducerTestBase.java    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaProducerTestBase.java b/flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaProducerTestBase.java
index 311e515..d89e8ad 100644
--- a/flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaProducerTestBase.java
+++ b/flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaProducerTestBase.java
@@ -280,13 +280,12 @@ public abstract class KafkaProducerTestBase extends KafkaTestBaseWithFlink {
 		try {
 			env.execute("One-to-one at least once test");
 			fail("Job should fail!");
-		}
-		catch (JobExecutionException ex) {
+		} catch (JobExecutionException ex) {
 			// ignore error, it can be one of many errors so it would be hard to check the exception message/cause
+		} finally {
+			kafkaServer.unblockProxyTraffic();
 		}
 
-		kafkaServer.unblockProxyTraffic();
-
 		// assert that before failure we successfully snapshot/flushed all expected elements
 		assertAtLeastOnceForTopic(
 				properties,