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

    https://github.com/apache/spark/pull/3783#discussion_r22763770
  
    --- Diff: 
core/src/test/scala/org/apache/spark/ExecutorAllocationManagerSuite.scala ---
    @@ -597,6 +607,41 @@ class ExecutorAllocationManagerSuite extends FunSuite 
with LocalSparkContext {
         assert(removeTimes(manager).size === 1)
       }
     
    +  test("call onTaskStart before onBlockManagerAdded") {
    +    sc = createSparkContext(2, 10)
    +    val manager = sc.executorAllocationManager.get
    +    assert(executorIds(manager).isEmpty)
    +    assert(removeTimes(manager).isEmpty)
    +
    +    sc.listenerBus.postToAll(SparkListenerTaskStart(0, 0, 
createTaskInfo(0, 0, "executor-1")))
    +    sc.listenerBus.postToAll(SparkListenerBlockManagerAdded(
    +      0L, BlockManagerId("executor-1", "host1", 1), 100L))
    +    assert(executorIds(manager).size === 1)
    +    assert(executorIds(manager).contains("executor-1"))
    +    assert(removeTimes(manager).size === 0)
    +  }
    +
    +  test("onExecutorAdded should not add a busy executor to removeTimes") {
    --- End diff --
    
    I added `SPARK-4951` to the test name.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to