flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-10545) Remove JobManagerLeaderSessionIDITCase
Date Mon, 15 Oct 2018 08:55:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-10545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16649908#comment-16649908
] 

ASF GitHub Bot commented on FLINK-10545:
----------------------------------------

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:
users@infra.apache.org


> Remove JobManagerLeaderSessionIDITCase
> --------------------------------------
>
>                 Key: FLINK-10545
>                 URL: https://issues.apache.org/jira/browse/FLINK-10545
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Tests
>    Affects Versions: 1.7.0
>            Reporter: TisonKun
>            Assignee: TisonKun
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> {{JobManagerLeaderSessionIDITCase.scala}} is based on legacy mode and I think we now
have {{FencingToken}} and need not to maintain or port this test. Just simply remove it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message