Skip to content

Commit

Permalink
Code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Vandenberg committed Jul 7, 2017
1 parent f2399e9 commit ddbe489
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1177,8 +1177,7 @@ class TaskSetManagerSuite extends SparkFunSuite with LocalSparkContext with Logg
// retrying the task otherwise there's a race condition where run on
// the same executor that it was intended to be black listed from.
val conf = new SparkConf().
set(config.BLACKLIST_ENABLED, true).
set(config.MAX_TASK_ATTEMPTS_PER_EXECUTOR, 1)
set(config.BLACKLIST_ENABLED, true)

// Create a task with two executors.
sc = new SparkContext("local", "test", conf)
Expand Down Expand Up @@ -1208,10 +1207,9 @@ class TaskSetManagerSuite extends SparkFunSuite with LocalSparkContext with Logg
}
)

// Simulate an out of memory error
val e = new OutOfMemoryError
taskSetManagerSpy.handleFailedTask(
taskDesc.get.taskId, TaskState.FAILED, new ExceptionFailure(e, Seq()))
// Simulate a fake exception
val e = new ExceptionFailure("a", "b", Array(), "c", None)
taskSetManagerSpy.handleFailedTask(taskDesc.get.taskId, TaskState.FAILED, e)

verify(taskSetManagerSpy, times(1)).addPendingTask(anyInt())
}
Expand Down

0 comments on commit ddbe489

Please sign in to comment.