tillrohrmann closed pull request #6840: [FLINK-10545] [tests] Remove 
JobManagerLeaderSessionIDITCase
URL: https://github.com/apache/flink/pull/6840
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/jobmanager/JobManagerLeaderSessionIDITCase.scala
 
b/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/jobmanager/JobManagerLeaderSessionIDITCase.scala
deleted file mode 100644
index c0ccd53c875..00000000000
--- 
a/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/jobmanager/JobManagerLeaderSessionIDITCase.scala
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.flink.api.scala.runtime.jobmanager
-
-import java.util.UUID
-import java.util.concurrent.CountDownLatch
-
-import akka.actor.ActorSystem
-import akka.testkit.{ImplicitSender, TestKit}
-import org.apache.flink.core.testutils.OneShotLatch
-import org.apache.flink.runtime.akka.{AkkaUtils, ListeningBehaviour}
-import org.apache.flink.runtime.execution.Environment
-import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable
-import org.apache.flink.runtime.jobgraph.{JobGraph, JobVertex}
-import org.apache.flink.runtime.messages.JobManagerMessages._
-import org.apache.flink.runtime.testingUtils.{ScalaTestingUtils, TestingUtils}
-import org.junit.runner.RunWith
-import org.scalatest.junit.JUnitRunner
-import org.scalatest.{BeforeAndAfterAll, FunSuiteLike, Matchers}
-
-@RunWith(classOf[JUnitRunner])
-class JobManagerLeaderSessionIDITCase(_system: ActorSystem)
-  extends TestKit(_system)
-  with ImplicitSender
-  with FunSuiteLike
-  with Matchers
-  with BeforeAndAfterAll
-  with ScalaTestingUtils {
-
-  import BlockingUntilSignalNoOpInvokable._
-
-  val cluster = TestingUtils.startTestingCluster(
-    taskManagerNumSlots,
-    numTaskManagers,
-    TestingUtils.DEFAULT_AKKA_ASK_TIMEOUT);
-
-  def this() = this(ActorSystem("TestingActorSystem", 
AkkaUtils.getDefaultAkkaConfig))
-
-  override def afterAll(): Unit = {
-    cluster.stop()
-    TestKit.shutdownActorSystem(system)
-  }
-
-  test("A JobManager should not process CancelJob messages with the wrong 
leader session ID") {
-    val sender = new JobVertex("BlockingSender");
-    sender.setParallelism(numSlots)
-    sender.setInvokableClass(classOf[BlockingUntilSignalNoOpInvokable])
-    val jobGraph = new JobGraph("TestJob", sender)
-
-    val oldSessionID = UUID.randomUUID()
-
-    val jmGateway = cluster.getLeaderGateway(TestingUtils.TESTING_DURATION)
-    val jm = jmGateway.actor()
-
-    within(TestingUtils.TESTING_DURATION) {
-      jmGateway.tell(SubmitJob(jobGraph, ListeningBehaviour.EXECUTION_RESULT), 
self)
-
-      expectMsg(JobSubmitSuccess(jobGraph.getJobID))
-
-      BlockingUntilSignalNoOpInvokable.countDownLatch.await()
-
-      jm ! LeaderSessionMessage(oldSessionID, CancelJob(jobGraph.getJobID))
-
-      BlockingUntilSignalNoOpInvokable.oneShotLatch.trigger()
-
-      expectMsgType[JobResultSuccess]
-    }
-  }
-}
-
-class BlockingUntilSignalNoOpInvokable(env: Environment) extends 
AbstractInvokable(env) {
-
-  override def invoke(): Unit = {
-    BlockingUntilSignalNoOpInvokable.countDownLatch.countDown()
-    BlockingUntilSignalNoOpInvokable.oneShotLatch.await()
-  }
-}
-
-object BlockingUntilSignalNoOpInvokable {
-  val numTaskManagers = 2
-  val taskManagerNumSlots = 2
-  val numSlots = numTaskManagers * taskManagerNumSlots
-
-  val countDownLatch = new CountDownLatch(numSlots)
-
-  val oneShotLatch = new OneShotLatch()
-}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to