You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2017/10/17 12:36:11 UTC

flink git commit: [FLINK-7785] [tests] Harden DispatcherTest

Repository: flink
Updated Branches:
  refs/heads/master 14bc62740 -> 9772e03d7


[FLINK-7785] [tests] Harden DispatcherTest

Start dispatchers with different endpoint ids in order to avoid name clashes in case
that the previous Dispatcher has not been completely shut down. This is recommended
practice by Akka.


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

Branch: refs/heads/master
Commit: 9772e03d725e607495f5602f716609e3e7f9b248
Parents: 14bc627
Author: Till <ti...@gmail.com>
Authored: Tue Oct 17 12:12:06 2017 +0200
Committer: Till <ti...@gmail.com>
Committed: Tue Oct 17 12:12:06 2017 +0200

----------------------------------------------------------------------
 .../org/apache/flink/runtime/dispatcher/DispatcherTest.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/9772e03d/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
index 682b907..d1ca757 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherTest.java
@@ -45,7 +45,9 @@ import org.apache.flink.util.TestLogger;
 
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TestName;
 import org.mockito.Mockito;
 
 import java.util.Optional;
@@ -64,6 +66,9 @@ import static org.mockito.Mockito.when;
  */
 public class DispatcherTest extends TestLogger {
 
+	@Rule
+	public TestName name = new TestName();
+
 	private static RpcService rpcService;
 	private static final Time timeout = Time.seconds(10L);
 
@@ -103,7 +108,7 @@ public class DispatcherTest extends TestLogger {
 
 		final TestingDispatcher dispatcher = new TestingDispatcher(
 			rpcService,
-			Dispatcher.DISPATCHER_NAME,
+			Dispatcher.DISPATCHER_NAME + '_' + name.getMethodName(),
 			new Configuration(),
 			haServices,
 			mock(ResourceManagerGateway.class),
@@ -163,7 +168,7 @@ public class DispatcherTest extends TestLogger {
 
 		final TestingDispatcher dispatcher = new TestingDispatcher(
 			rpcService,
-			Dispatcher.DISPATCHER_NAME,
+			Dispatcher.DISPATCHER_NAME + '_' + name.getMethodName(),
 			new Configuration(),
 			haServices,
 			mock(ResourceManagerGateway.class),