Skip to content

Commit ddbe489

Browse files
author
Eric Vandenberg
committed
Code review comments
1 parent f2399e9 commit ddbe489

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,8 +1177,7 @@ class TaskSetManagerSuite extends SparkFunSuite with LocalSparkContext with Logg
11771177
// retrying the task otherwise there's a race condition where run on
11781178
// the same executor that it was intended to be black listed from.
11791179
val conf = new SparkConf().
1180-
set(config.BLACKLIST_ENABLED, true).
1181-
set(config.MAX_TASK_ATTEMPTS_PER_EXECUTOR, 1)
1180+
set(config.BLACKLIST_ENABLED, true)
11821181

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

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

12161214
verify(taskSetManagerSpy, times(1)).addPendingTask(anyInt())
12171215
}

0 commit comments

Comments
 (0)