attilapiros commented on a change in pull request #29014: URL: https://github.com/apache/spark/pull/29014#discussion_r459926684
########## File path: core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala ########## @@ -1802,6 +1802,46 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with B assert(2 == taskDescriptions.head.resources(GPU).addresses.size) } + test("scheduler should keep the decommission info where host was decommissioned") { + val scheduler = setupScheduler() + scheduler.executorDecommission("1", ExecutorDecommissionInfo("1", false)) + scheduler.executorDecommission("2", ExecutorDecommissionInfo("2", true)) + scheduler.executorDecommission("1", ExecutorDecommissionInfo("1 new", false)) + scheduler.executorDecommission("2", ExecutorDecommissionInfo("2 new", false)) + assert(scheduler.getExecutorDecommissionInfo("1") + === Some(ExecutorDecommissionInfo("1 new", false))) + assert(scheduler.getExecutorDecommissionInfo("2") + === Some(ExecutorDecommissionInfo("2", true))) + assert(scheduler.getExecutorDecommissionInfo("3").isEmpty) + } + + test("scheduler should not ignore decommissioning of removed executors") { Review comment: "should not ignore" => "should ignore" ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org