sarutak commented on a change in pull request #32845:
URL: https://github.com/apache/spark/pull/32845#discussion_r648799953
##########
File path: core/src/test/scala/org/apache/spark/SparkContextSuite.scala
##########
@@ -1285,6 +1285,30 @@ class SparkContextSuite extends SparkFunSuite with
LocalSparkContext with Eventu
}
}
}
+
+ test("SPARK-35691: addFile/addJar/addDirectory should put CanonicalFile") {
+ withTempDir { dir =>
+ try {
+ val sep = File.separator
+ val tmpDir = Utils.createTempDir(dir.getAbsolutePath + sep + "." + sep
+ ".")
+ val tmpJar = File.createTempFile("test", ".jar", tmpDir)
+ val tmpFile = File.createTempFile("test", ".txt", tmpDir)
+
+ sc = new SparkContext(new
SparkConf().setAppName("test").setMaster("local"))
+ sc.addJar(tmpJar.getAbsolutePath)
+ sc.addFile(tmpFile.getAbsolutePath)
Review comment:
Could you add a test for directories?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]