Skip to content

Commit fdd1573

Browse files
committed
fix failed test cases
1 parent 941a4fd commit fdd1573

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ class TaskSetManagerSuite extends FunSuite with LocalSparkContext with Logging {
245245
// Offer host2, exec3 again, at NODE_LOCAL level: we should get noPref task
246246
// after failing to find a node_Local task
247247
assert(manager.resourceOffer("exec3", "host2", NODE_LOCAL) == None)
248+
clock.advance(LOCALITY_WAIT)
248249
assert(manager.resourceOffer("exec3", "host2", NO_PREF).get.index == 3)
249250
}
250251

@@ -577,6 +578,7 @@ class TaskSetManagerSuite extends FunSuite with LocalSparkContext with Logging {
577578
// schedule a node local task
578579
assert(manager.resourceOffer("execA", "host1", NODE_LOCAL).get.index === 1)
579580
manager.speculatableTasks += 1
581+
clock.advance(LOCALITY_WAIT)
580582
// schedule the nonPref task
581583
assert(manager.resourceOffer("execA", "host1", NO_PREF).get.index === 2)
582584
// schedule the speculative task

0 commit comments

Comments
 (0)