Skip to content

Commit fb6c0cb

Browse files
committed
[HOTFIX] Fix test build break in ExecutorAllocationManagerSuite.
This was caused because #3486 added a new field to ExecutorInfo and #4369 added new tests that created ExecutorInfos. These patches were merged in quick succession and were never tested together, hence the compilation error.
1 parent 80f3bcb commit fb6c0cb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/src/test/scala/org/apache/spark/ExecutorAllocationManagerSuite.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class ExecutorAllocationManagerSuite extends FunSuite with LocalSparkContext {
145145
// Verify that running a task reduces the cap
146146
sc.listenerBus.postToAll(SparkListenerStageSubmitted(createStageInfo(1, 3)))
147147
sc.listenerBus.postToAll(SparkListenerExecutorAdded(
148-
0L, "executor-1", new ExecutorInfo("host1", 1)))
148+
0L, "executor-1", new ExecutorInfo("host1", 1, Map.empty)))
149149
sc.listenerBus.postToAll(SparkListenerTaskStart(1, 0, createTaskInfo(0, 0, "executor-1")))
150150
assert(numExecutorsPending(manager) === 4)
151151
assert(addExecutors(manager) === 1)
@@ -579,13 +579,13 @@ class ExecutorAllocationManagerSuite extends FunSuite with LocalSparkContext {
579579

580580
// New executors have registered
581581
sc.listenerBus.postToAll(SparkListenerExecutorAdded(
582-
0L, "executor-1", new ExecutorInfo("host1", 1)))
582+
0L, "executor-1", new ExecutorInfo("host1", 1, Map.empty)))
583583
assert(executorIds(manager).size === 1)
584584
assert(executorIds(manager).contains("executor-1"))
585585
assert(removeTimes(manager).size === 1)
586586
assert(removeTimes(manager).contains("executor-1"))
587587
sc.listenerBus.postToAll(SparkListenerExecutorAdded(
588-
0L, "executor-2", new ExecutorInfo("host2", 1)))
588+
0L, "executor-2", new ExecutorInfo("host2", 1, Map.empty)))
589589
assert(executorIds(manager).size === 2)
590590
assert(executorIds(manager).contains("executor-2"))
591591
assert(removeTimes(manager).size === 2)
@@ -612,7 +612,7 @@ class ExecutorAllocationManagerSuite extends FunSuite with LocalSparkContext {
612612

613613
sc.listenerBus.postToAll(SparkListenerTaskStart(0, 0, createTaskInfo(0, 0, "executor-1")))
614614
sc.listenerBus.postToAll(SparkListenerExecutorAdded(
615-
0L, "executor-1", new ExecutorInfo("host1", 1)))
615+
0L, "executor-1", new ExecutorInfo("host1", 1, Map.empty)))
616616
assert(executorIds(manager).size === 1)
617617
assert(executorIds(manager).contains("executor-1"))
618618
assert(removeTimes(manager).size === 0)
@@ -624,15 +624,15 @@ class ExecutorAllocationManagerSuite extends FunSuite with LocalSparkContext {
624624
assert(executorIds(manager).isEmpty)
625625
assert(removeTimes(manager).isEmpty)
626626
sc.listenerBus.postToAll(SparkListenerExecutorAdded(
627-
0L, "executor-1", new ExecutorInfo("host1", 1)))
627+
0L, "executor-1", new ExecutorInfo("host1", 1, Map.empty)))
628628
sc.listenerBus.postToAll(SparkListenerTaskStart(0, 0, createTaskInfo(0, 0, "executor-1")))
629629

630630
assert(executorIds(manager).size === 1)
631631
assert(executorIds(manager).contains("executor-1"))
632632
assert(removeTimes(manager).size === 0)
633633

634634
sc.listenerBus.postToAll(SparkListenerExecutorAdded(
635-
0L, "executor-2", new ExecutorInfo("host1", 1)))
635+
0L, "executor-2", new ExecutorInfo("host1", 1, Map.empty)))
636636
assert(executorIds(manager).size === 2)
637637
assert(executorIds(manager).contains("executor-2"))
638638
assert(removeTimes(manager).size === 1)

0 commit comments

Comments
 (0)