@@ -940,15 +940,13 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with B
940940 val offers = (0 until 10 ).map{ idx => WorkerOffer (s " exec- $idx" , s " host- $idx" , 1 ) }
941941 taskScheduler.resourceOffers(offers)
942942 assert(tsm.runningTasks === 10 )
943- if (stageAttempt < 2 ) {
944- // fail attempt
945- tsm.handleFailedTask(tsm.taskAttempts.head.head.taskId, TaskState .FAILED ,
946- FetchFailed (null , 0 , 0 , 0 , " fetch failed" ))
947- // the attempt is a zombie, but the tasks are still running (this could be true even if
948- // we actively killed those tasks, as killing is best-effort)
949- assert(tsm.isZombie)
950- assert(tsm.runningTasks === 9 )
951- }
943+ // fail attempt
944+ tsm.handleFailedTask(tsm.taskAttempts.head.head.taskId, TaskState .FAILED ,
945+ FetchFailed (null , 0 , 0 , 0 , " fetch failed" ))
946+ // the attempt is a zombie, but the tasks are still running (this could be true even if
947+ // we actively killed those tasks, as killing is best-effort)
948+ assert(tsm.isZombie)
949+ assert(tsm.runningTasks === 9 )
952950 tsm
953951 }
954952
@@ -979,8 +977,7 @@ class TaskSchedulerImplSuite extends SparkFunSuite with LocalSparkContext with B
979977 assert(
980978 taskScheduler.resourceOffers(IndexedSeq (WorkerOffer (" exec-1" , " host-1" , 1 ))).flatten.isEmpty)
981979
982- val allTaskSets = zombieAttempts ++ Seq (finalTsm)
983- val remainingTasks = (0 until 10 ).toSet.diff(finalAttemptPendingPartitions)
980+ val remainingTasks = (0 until 10 ).toSet.diff(finalAttemptPendingPartitions).toIndexedSeq.sorted
984981
985982 // finally, if we finish the remaining partitions from a mix of tasksets, all attempts should be
986983 // marked as zombie.
0 commit comments