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

    https://github.com/apache/spark/pull/16346#discussion_r96530866
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/BlacklistTrackerSuite.scala ---
    @@ -88,6 +88,86 @@ class BlacklistTrackerSuite extends SparkFunSuite with 
BeforeAndAfterEach with M
         new TaskSetBlacklist(conf, stageId, clock)
       }
     
    +  def configureBlacklistAndScheduler(confs: (String, String)*): Unit = {
    +    conf = new SparkConf().setAppName("test").setMaster("local")
    +      .set(config.BLACKLIST_ENABLED.key, "true")
    +    confs.foreach { case (k, v) => conf.set(k, v) }
    +
    +    clock.setTime(0)
    +    listenerBusMock = mock[LiveListenerBus]
    +    blacklist = new BlacklistTracker(listenerBusMock, conf, clock)
    +  }
    +
    +  test("Blacklisting individual tasks and checking for 
SparkListenerEvents") {
    +    configureBlacklistAndScheduler()
    --- End diff --
    
    Certainly this doesn't need a dedicated test. But there will be a large 
number - dozens - of listenerBusMock checks for blacklisting and 
unblacklisting. I'm working on this now, but, there will be a substantial diff 
here.
    
    A freebie is that by checking for the listener bus events we're also 
asserting that executors and nodes are being blacklisted with the correct 
number of failures, and we're making that number explicit.


---
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