Ngone51 commented on a change in pull request #27116: [SPARK-30440][CORE][TEST] 
Fix flaky test of SPARK-30359
URL: https://github.com/apache/spark/pull/27116#discussion_r364035033
 
 

 ##########
 File path: 
core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
 ##########
 @@ -1919,7 +1919,12 @@ class TaskSetManagerSuite
     TestUtils.waitUntilExecutorsUp(sc, 2, 60000)
     val Seq(exec0, exec1) = backend.getExecutorIds()
 
-    val taskSet = FakeTask.createTaskSet(2)
+    // SPARK-30440: it's possible that tasks have already been scheduled after 
we call
+    // `sched.submitTasks(taskSet)` but before `manager.resourceOffer`. In 
this case,
 
 Review comment:
   Because this test is kind of somehow hacky. Instead of using mock  
schedulerBackend and taskScheduler, we use the real 
`CoarseGrainedSchedulerBackend` and `TaskSchedulerImpl` from a `SparkContext` 
due to the reason that we want use `reset()` within 
`CoarseGrainedSchedulerBackend`. As a result, when we call 
`sched.submitTasks(taskSet)`, it will schedule tasks immediately.
   
   I shall put this background in the comment, too.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to