Repository: flink Updated Branches: refs/heads/master 6d1656a21 -> 0fea61a04
[test-stability] Sets the number of ZooKeeper servers of TestingCluster in ForkableFlinkMiniCluster to 1 in order to avoid test failures when two servers try to bind to the same port. Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/0fea61a0 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/0fea61a0 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/0fea61a0 Branch: refs/heads/master Commit: 0fea61a049ce657c30218bc411d2d35e582849c3 Parents: 6d1656a Author: Till Rohrmann <trohrm...@apache.org> Authored: Mon Sep 21 13:47:09 2015 +0200 Committer: Till Rohrmann <trohrm...@apache.org> Committed: Tue Sep 22 11:19:43 2015 +0200 ---------------------------------------------------------------------- .../flink/test/util/ForkableFlinkMiniCluster.scala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/0fea61a0/flink-test-utils/src/main/scala/org/apache/flink/test/util/ForkableFlinkMiniCluster.scala ---------------------------------------------------------------------- diff --git a/flink-test-utils/src/main/scala/org/apache/flink/test/util/ForkableFlinkMiniCluster.scala b/flink-test-utils/src/main/scala/org/apache/flink/test/util/ForkableFlinkMiniCluster.scala index 69ca6b7..c8b0e0c 100644 --- a/flink-test-utils/src/main/scala/org/apache/flink/test/util/ForkableFlinkMiniCluster.scala +++ b/flink-test-utils/src/main/scala/org/apache/flink/test/util/ForkableFlinkMiniCluster.scala @@ -34,9 +34,8 @@ import org.apache.flink.runtime.testingUtils.TestingTaskManagerMessages .NotifyWhenRegisteredAtJobManager import org.apache.flink.runtime.testingUtils.{TestingUtils, TestingTaskManager, TestingJobManager, TestingMemoryArchivist} -import org.apache.flink.runtime.webmonitor.WebMonitor -import scala.concurrent.{Future, Promise, Await} +import scala.concurrent.{Future, Await} /** * A forkable mini cluster is a special case of the mini cluster, used for parallel test execution @@ -160,7 +159,7 @@ class ForkableFlinkMiniCluster( system, hostname, Some(TaskManager.TASK_MANAGER_NAME + index), - Some(createLeaderRetrievalService), + Some(createLeaderRetrievalService()), localExecution, streamingMode, classOf[TestingTaskManager]) @@ -186,7 +185,7 @@ class ForkableFlinkMiniCluster( val newJobManagerActorSystem = if(!singleActorSystem) { startJobManagerActorSystem(index) } else { - jmActorSystems(0) + jmActorSystems.head } val newJobManagerActor = startJobManager(index, newJobManagerActorSystem) @@ -197,7 +196,7 @@ class ForkableFlinkMiniCluster( Seq(newJobManagerActorSystem), 1)) - val lrs = createLeaderRetrievalService + val lrs = createLeaderRetrievalService() leaderRetrievalService = Some(lrs) lrs.start(this) @@ -222,7 +221,7 @@ class ForkableFlinkMiniCluster( val taskManagerActorSystem = if(!singleActorSystem) { startTaskManagerActorSystem(index) } else { - tmActorSystems(0) + tmActorSystems.head } val taskManagerActor = startTaskManager(index, taskManagerActorSystem) @@ -241,7 +240,7 @@ class ForkableFlinkMiniCluster( zookeeperCluster = if(recoveryMode == RecoveryMode.ZOOKEEPER && zookeeperURL.equals("")) { LOG.info("Starting ZooKeeper cluster.") - val testingCluster = new TestingCluster(numJobManagers) + val testingCluster = new TestingCluster(1) configuration.setString(ConfigConstants.ZOOKEEPER_QUORUM_KEY, testingCluster.getConnectString)