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

    https://github.com/apache/spark/pull/20203#discussion_r162714257
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/TaskSetBlacklistSuite.scala ---
    @@ -59,31 +60,55 @@ class TaskSetBlacklistSuite extends SparkFunSuite with 
BeforeAndAfterEach with M
           val shouldBeBlacklisted = (executor == "exec1" && index == 0)
           assert(taskSetBlacklist.isExecutorBlacklistedForTask(executor, 
index) === shouldBeBlacklisted)
         }
    +
         assert(!taskSetBlacklist.isExecutorBlacklistedForTaskSet("exec1"))
    +    verify(listenerBusMock, never())
    +      .post(isA(classOf[SparkListenerExecutorBlacklistedForStage]))
    +
         assert(!taskSetBlacklist.isNodeBlacklistedForTaskSet("hostA"))
    +    verify(listenerBusMock, never())
    +      .post(isA(classOf[SparkListenerNodeBlacklistedForStage]))
     
         // Mark task 1 failed on exec1 -- this pushes the executor into the 
blacklist
         taskSetBlacklist.updateBlacklistForFailedTask(
           "hostA", exec = "exec1", index = 1, failureReason = "testing")
    +
         assert(taskSetBlacklist.isExecutorBlacklistedForTaskSet("exec1"))
    -    assert(!taskSetBlacklist.isNodeBlacklistedForTaskSet("hostA"))
         verify(listenerBusMock).post(
           SparkListenerExecutorBlacklistedForStage(0, "exec1", 2, 0, 
attemptId))
    +
    +    assert(!taskSetBlacklist.isNodeBlacklistedForTaskSet("hostA"))
    +    verify(listenerBusMock, never())
    +      .post(isA(classOf[SparkListenerNodeBlacklistedForStage]))
    +
         // Mark one task as failed on exec2 -- not enough for any further 
blacklisting yet.
         taskSetBlacklist.updateBlacklistForFailedTask(
           "hostA", exec = "exec2", index = 0, failureReason = "testing")
         assert(taskSetBlacklist.isExecutorBlacklistedForTaskSet("exec1"))
    +
         assert(!taskSetBlacklist.isExecutorBlacklistedForTaskSet("exec2"))
    +    verify(listenerBusMock, never()).post(
    +      SparkListenerNodeBlacklistedForStage(0, "hostA", 2, 0, attemptId))
    +
         assert(!taskSetBlacklist.isNodeBlacklistedForTaskSet("hostA"))
    +    verify(listenerBusMock, never())
    +      .post(isA(classOf[SparkListenerNodeBlacklistedForStage]))
    --- End diff --
    
    the `verify` you add just above this is pointless with this one too, right? 
 I think you only need this one.


---

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

Reply via email to