Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Commit 2b5dcac

Browse files
committed
Pin down app ID in tests. Fix test style.
1 parent a4f9797 commit 2b5dcac

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

resource-managers/kubernetes/core/src/test/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterSchedulerBackendSuite.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ package org.apache.spark.scheduler.cluster.k8s
1818

1919
import java.util.concurrent.{ExecutorService, ScheduledExecutorService, TimeUnit}
2020

21-
import scala.collection.JavaConverters._
22-
import scala.concurrent.Future
23-
2421
import io.fabric8.kubernetes.api.model.{DoneablePod, Pod, PodBuilder, PodList}
2522
import io.fabric8.kubernetes.client.{KubernetesClient, Watch, Watcher}
2623
import io.fabric8.kubernetes.client.Watcher.Action
@@ -30,6 +27,8 @@ import org.mockito.Matchers.{any, eq => mockitoEq}
3027
import org.mockito.Mockito.{doNothing, never, times, verify, when}
3128
import org.scalatest.BeforeAndAfter
3229
import org.scalatest.mock.MockitoSugar._
30+
import scala.collection.JavaConverters._
31+
import scala.concurrent.Future
3332

3433
import org.apache.spark.{SparkConf, SparkContext, SparkFunSuite}
3534
import org.apache.spark.deploy.k8s.config._
@@ -142,7 +141,6 @@ class KubernetesClusterSchedulerBackendSuite
142141
before {
143142
MockitoAnnotations.initMocks(this)
144143
sparkConf = new SparkConf()
145-
.set("spark.app.id", APP_ID)
146144
.set(KUBERNETES_DRIVER_POD_NAME, DRIVER_POD_NAME)
147145
.set(KUBERNETES_NAMESPACE, NAMESPACE)
148146
.set("spark.driver.host", SPARK_DRIVER_HOST)
@@ -368,7 +366,10 @@ class KubernetesClusterSchedulerBackendSuite
368366
executorPodFactory,
369367
kubernetesClient,
370368
allocatorExecutor,
371-
requestExecutorsService)
369+
requestExecutorsService) {
370+
371+
override def applicationId(): String = APP_ID
372+
}
372373
}
373374

374375
private def exitPod(basePod: Pod, exitCode: Int): Pod = {

0 commit comments

Comments
 (0)