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

    https://github.com/apache/spark/pull/7119#discussion_r34909405
  
    --- Diff: core/src/test/scala/org/apache/spark/scheduler/PoolSuite.scala ---
    @@ -178,4 +185,30 @@ class PoolSuite extends SparkFunSuite with 
LocalSparkContext {
         scheduleTaskAndVerifyId(2, rootPool, 6)
         scheduleTaskAndVerifyId(3, rootPool, 2)
       }
    +
    +  test("Fair Scheduler maxRunning Test") {
    +    sc = new SparkContext("local", "TaskSchedulerImplSuite")
    +    val taskScheduler = new TaskSchedulerImpl(sc)
    +
    +    val rootPool = new Pool("", SchedulingMode.FAIR, 0, 0, 3)
    +
    +    val taskSetManager0 = createTaskSetManager(0, 2, taskScheduler)
    +    val taskSetManager1 = createTaskSetManager(1, 2, taskScheduler)
    +    val taskSetManager2 = createTaskSetManager(2, 2, taskScheduler)
    +    val taskSetManager3 = createTaskSetManager(3, 2, taskScheduler)
    +
    +    rootPool.addSchedulable(taskSetManager0)
    +    rootPool.addSchedulable(taskSetManager1)
    +    rootPool.addSchedulable(taskSetManager2)
    +    rootPool.addSchedulable(taskSetManager3)
    +
    +    scheduleTaskAndVerifyId(0, rootPool, 0)
    +    scheduleTaskAndVerifyId(1, rootPool, 1)
    +    scheduleTaskAndVerifyId(2, rootPool, 2)
    +    scheduleTaskAndVerifyId(3, rootPool, 0)
    +    scheduleTaskAndVerifyId(4, rootPool, 1)
    +    scheduleTaskAndVerifyId(5, rootPool, 2)
    +
    +    verifyNoRemainedTask(rootPool)
    --- End diff --
    
    Better yet, make it `noTasksRemainIn(pool: Pool)`.


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