Github user mgummelt commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14175#discussion_r73822922
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackendSuite.scala
 ---
    @@ -341,6 +344,32 @@ class MesosCoarseGrainedSchedulerBackendSuite extends 
SparkFunSuite
         assert(!dockerInfo.getForcePullImage)
       }
     
    +  test("Do not call parent methods like removeExecutor() after backend is 
stopped") {
    +    setBackend()
    +
    +    // launches a task on a valid offer
    +    val offers = List((backend.executorMemory(sc), 1))
    +    offerResources(offers)
    +    verifyTaskLaunched(driver, "o1")
    +
    +    // launches a thread simulating status update
    +    val statusUpdateThread = new Thread {
    +      override def run(): Unit = {
    +        while (!stopCalled) {
    +          Thread.sleep(100)
    +        }
    +
    +        val status = createTaskStatus("0", "s1", TaskState.TASK_FINISHED)
    +        backend.statusUpdate(driver, status)
    +      }
    +    }.start
    +
    +    backend.stop
    +    // Any method of the backend involving sending messages to the driver 
endpoint should not
    +    // be called after the backend is stopped.
    +    verify(driverEndpoint, 
never()).askWithRetry(isA(classOf[RemoveExecutor]))(any[ClassTag[_]])
    --- End diff --
    
    This isn't really what we care to test.  What we care to test is that no 
exception is thrown in `statusUpdate`.  Can you check that instead?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to