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

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

commit 34bab6f577a5f91edadc93aeae76eefb913ba846
Author: Jiangjie (Becket) Qin <[email protected]>
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,

Reply via email to