flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject [2/4] flink git commit: [FLINK-7487][tests] fix ClassLoaderITCase#testDisposeSavepointWithCustomKvState not self-contained
Date Thu, 28 Sep 2017 08:59:48 GMT
[FLINK-7487][tests] fix ClassLoaderITCase#testDisposeSavepointWithCustomKvState not self-contained

The cancellation of the job started in #testDisposeSavepointWithCustomKvState
may actually continue after the test method succeeds and may thus stop further
jobs from being executed. This may result in a NoResourceAvailableException.

[FLINK-7487][tests] address PR comments

This closes #4571.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/84bfec9d
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/84bfec9d
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/84bfec9d

Branch: refs/heads/master
Commit: 84bfec9d9b31f8664f5bdf52a901d12991e03e16
Parents: adeab64
Author: Nico Kruber <nico@data-artisans.com>
Authored: Mon Aug 21 17:20:30 2017 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Thu Sep 28 09:31:16 2017 +0200

----------------------------------------------------------------------
 .../org/apache/flink/test/classloading/ClassLoaderITCase.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/84bfec9d/flink-tests/src/test/java/org/apache/flink/test/classloading/ClassLoaderITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/classloading/ClassLoaderITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/classloading/ClassLoaderITCase.java
index 98bb0ea..a09633d 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/classloading/ClassLoaderITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/classloading/ClassLoaderITCase.java
@@ -69,6 +69,7 @@ import scala.concurrent.duration.FiniteDuration;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.isA;
 import static org.hamcrest.Matchers.hasProperty;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
@@ -391,5 +392,9 @@ public class ClassLoaderITCase extends TestLogger {
 		Future<?> cancelFuture = jm.ask(new JobManagerMessages.CancelJob(jobId), deadline.timeLeft());
 		Object response = Await.result(cancelFuture, deadline.timeLeft());
 		assertTrue("Unexpected response: " + response, response instanceof JobManagerMessages.CancellationSuccess);
+
+		// make sure, the execution is finished to not influence other test methods
+		invokeThread.join(deadline.timeLeft().toMillis());
+		assertFalse("Program invoke thread still running", invokeThread.isAlive());
 	}
 }


Mime
View raw message