xubo245 commented on a change in pull request #23633: [SPARK-26710][TEST] Fix 
some errors in image test case
URL: https://github.com/apache/spark/pull/23633#discussion_r250616481
 
 

 ##########
 File path: 
mllib/src/test/scala/org/apache/spark/ml/image/ImageSchemaSuite.scala
 ##########
 @@ -17,18 +17,19 @@
 
 package org.apache.spark.ml.image
 
+import java.io.File
 import java.nio.file.Paths
 import java.util.Arrays
 
 import org.apache.spark.SparkFunSuite
 import org.apache.spark.ml.image.ImageSchema._
 import org.apache.spark.mllib.util.MLlibTestSparkContext
 import org.apache.spark.sql.Row
-import org.apache.spark.sql.types._
 
 class ImageSchemaSuite extends SparkFunSuite with MLlibTestSparkContext {
   // Single column of images named "image"
-  private lazy val imagePath = "../data/mllib/images/origin"
+  private lazy val imagePath = new File(this.getClass.getResource("/").getPath
 
 Review comment:
   The ubuntu and Mac  system both have this problem.  Are there any 
configuration except "git clone spar, mvn clean -DskipTests install, then run 
the test case"?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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