Skip to content

Commit

Permalink
update test since listenerBus.waitUntilEmpty now throws an exception …
Browse files Browse the repository at this point in the history
…instead of returning a boolean
  • Loading branch information
squito committed Jun 10, 2015
1 parent 883fe49 commit 7021d28
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,12 @@ class DAGSchedulerSuite
Map[Long, Any](),
createFakeTaskInfo(),
null))
assert(sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS))
sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS)
assert(sparkListener.failedStages.contains(1))

// Trigger resubmission of the failed map stage.
runEvent(ResubmitFailedStages)
assert(sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS))
sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS)

// Another attempt for the map stage should have been submitted, resulting in 2 total attempts.
assert(countSubmittedMapStageAttempts() === 2)
Expand All @@ -608,7 +608,7 @@ class DAGSchedulerSuite
// Another ResubmitFailedStages event should not result result in another attempt for the map
// stage being run concurrently.
runEvent(ResubmitFailedStages)
assert(sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS))
sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS)
assert(countSubmittedMapStageAttempts() === 2)

// NOTE: the actual ResubmitFailedStages may get called at any time during this, shouldn't effect anything --
Expand All @@ -634,7 +634,7 @@ class DAGSchedulerSuite
}

// The map stage should have been submitted.
assert(sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS))
sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS)
assert(countSubmittedMapStageAttempts() === 1)

// Complete the map stage.
Expand All @@ -643,7 +643,7 @@ class DAGSchedulerSuite
(Success, makeMapStatus("hostB", 1))))

// The reduce stage should have been submitted.
assert(sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS))
sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS)
assert(countSubmittedReduceStageAttempts() === 1)

// The first result task fails, with a fetch failure for the output from the first mapper.
Expand All @@ -661,7 +661,7 @@ class DAGSchedulerSuite

// Because the map stage finished, another attempt for the reduce stage should have been
// submitted, resulting in 2 total attempts for each the map and the reduce stage.
assert(sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS))
sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS)
assert(countSubmittedMapStageAttempts() === 2)
assert(countSubmittedReduceStageAttempts() === 2)

Expand Down

0 comments on commit 7021d28

Please sign in to comment.