Skip to content
Prev Previous commit
Next Next commit
[SPARK-26015][K8S] Fix broken client mode test
The client mode test was incorrectly overriding the entry point of the
image so didn't benefit from the logic that set up the /etc/passwd entry
for the container UID resulting in no home directory and a failed Ivy
setup as a result
  • Loading branch information
rvesse committed Nov 29, 2018
commit 6680c134043c922ab2e613177897dae3a0b6d672
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
package org.apache.spark.deploy.k8s.integrationtest

import org.scalatest.concurrent.Eventually
import scala.collection.JavaConverters._

import org.apache.spark.deploy.k8s.integrationtest.KubernetesSuite.{k8sTestTag, INTERVAL, TIMEOUT}
import org.scalatest.Tag

private[spark] trait ClientModeTestsSuite { k8sSuite: KubernetesSuite =>

test("Run in client mode.", k8sTestTag) {
test("Run in client mode.", k8sTestTag, Tag("k8s-client-mode")) {
val labels = Map("spark-app-selector" -> driverPodName)
val driverPort = 7077
val blockManagerPort = 10000
Expand Down Expand Up @@ -62,11 +62,12 @@ private[spark] trait ClientModeTestsSuite { k8sSuite: KubernetesSuite =>
.endMetadata()
.withNewSpec()
.withServiceAccountName(kubernetesTestComponents.serviceAccountName)
.withRestartPolicy("Never")
.addNewContainer()
.withName("spark-example")
.withImage(image)
.withImagePullPolicy("IfNotPresent")
.withCommand("/opt/spark/bin/run-example")
.addToArgs("/opt/spark/bin/run-example")
.addToArgs("--master", s"k8s://https://kubernetes.default.svc")
.addToArgs("--deploy-mode", "client")
.addToArgs("--conf", s"spark.kubernetes.container.image=$image")
Expand Down