holdenk commented on a change in pull request #25748: [SPARK-28904][K8S] Create 
mount for PvTestSuire
URL: https://github.com/apache/spark/pull/25748#discussion_r327750004
 
 

 ##########
 File path: 
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/PVTestsSuite.scala
 ##########
 @@ -111,15 +109,28 @@ private[spark] trait PVTestsSuite { k8sSuite: 
KubernetesSuite =>
       .storageClasses()
       .withName(STORAGE_NAME)
       .delete()
+
+    mountProcess.foreach(_.destroy())
+
   }
 
   private def checkPVs(pod: Pod, file: String) = {
+    implicit val podName: String = pod.getMetadata.getName
+    implicit val components: KubernetesTestComponents = 
kubernetesTestComponents
     Eventually.eventually(TIMEOUT, INTERVAL) {
-      implicit val podName: String = pod.getMetadata.getName
-      implicit val components: KubernetesTestComponents = 
kubernetesTestComponents
-      val contents = Utils.executeCommand("cat", 
s"$CONTAINER_MOUNT_PATH/$file")
-      assert(contents.toString.trim.equals(FILE_CONTENTS))
+      Utils.executeCommand("ls", s"$CONTAINER_MOUNT_PATH/")
 
 Review comment:
   This is to improve the debugging. We can see if the directory exists first 
and then check the file contents and have the failures be separate. This makes 
it easier to see if the PV mount failed or if the bind mount into minikube 
failed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to