You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by zh...@apache.org on 2020/07/15 02:41:33 UTC

[flink] branch master updated: [FLINK-17636][tests] Fix unstable test SingleInputGateTest#testConcurrentReadStateAndProcessAndClose

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

zhijiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new a9cce54  [FLINK-17636][tests] Fix unstable test SingleInputGateTest#testConcurrentReadStateAndProcessAndClose
a9cce54 is described below

commit a9cce5467b3f0628e665cd8c7dd9b2e5958f0fd7
Author: kevin.cyj <ke...@alibaba-inc.com>
AuthorDate: Mon Jul 13 15:02:25 2020 +0800

    [FLINK-17636][tests] Fix unstable test SingleInputGateTest#testConcurrentReadStateAndProcessAndClose
---
 .../runtime/io/network/partition/consumer/SingleInputGateTest.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateTest.java
index ea3f668..35a5c55 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateTest.java
@@ -228,9 +228,6 @@ public class SingleInputGateTest extends InputGateTestBase {
 							Thread.sleep(1);
 						}
 					} catch (Throwable t) {
-						if (!inputGate.getCloseFuture().isDone()) {
-							throw new AssertionError("Exceptions are expected here only if the gate was closed", t);
-						}
 						return null;
 					}
 				}
@@ -242,6 +239,7 @@ public class SingleInputGateTest extends InputGateTestBase {
 			// wait until the internal channel state recover task finishes
 			executor.awaitTermination(60, TimeUnit.SECONDS);
 			assertEquals(totalBuffers, environment.getNetworkBufferPool().getNumberOfAvailableMemorySegments());
+			assertTrue(inputGate.getCloseFuture().isDone());
 
 			environment.close();
 		}