Skip to content

Commit db14bd1

Browse files
committed
minor refactor
1 parent 7d0c39b commit db14bd1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/test/scala/org/apache/spark/executor/ExecutorSuite.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ class ExecutorSuite extends SparkFunSuite with LocalSparkContext with MockitoSug
254254
}
255255
}
256256

257-
test("Heartbeat should drop zero metrics") {
258-
heartbeatZeroMetricTest(true)
257+
test("Heartbeat should drop zero accumulator updates") {
258+
heartbeatZeroAccumulatorUpdateTest(true)
259259
}
260260

261-
test("Heartbeat should not drop zero metrics when the conf is set to false") {
262-
heartbeatZeroMetricTest(false)
261+
test("Heartbeat should not drop zero accumulator updates when the conf is disabled") {
262+
heartbeatZeroAccumulatorUpdateTest(false)
263263
}
264264

265265
private def withHeartbeatExecutor(confs: (String, String)*)
@@ -307,7 +307,7 @@ class ExecutorSuite extends SparkFunSuite with LocalSparkContext with MockitoSug
307307
method.invoke(executor)
308308
}
309309

310-
private def heartbeatZeroMetricTest(dropZeroMetrics: Boolean): Unit = {
310+
private def heartbeatZeroAccumulatorUpdateTest(dropZeroMetrics: Boolean): Unit = {
311311
val c = EXECUTOR_HEARTBEAT_DROP_ZERO_ACCUMULATOR_UPDATES.key -> dropZeroMetrics.toString
312312
withHeartbeatExecutor(c) { (executor, heartbeats) =>
313313
// When no tasks are running, there should be no accumulators sent in heartbeat

0 commit comments

Comments
 (0)