Skip to content

Commit

Permalink
Fix typos in path names
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Apr 26, 2017
1 parent b9ce248 commit bf21e3b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class LocalDirsSuite extends SparkFunSuite with BeforeAndAfter {

test("Utils.getLocalDir() returns a valid directory, even if some local dirs are missing") {
// Regression test for SPARK-2974
assert(!new File("/NONEXISTENT_DIR").exists())
assert(!new File("/NONEXISTENT_PATH").exists())
val conf = new SparkConf(false)
.set("spark.local.dir", s"/NONEXISTENT_PATH,${System.getProperty("java.io.tmpdir")}")
assert(new File(Utils.getLocalDir(conf)).exists())
}

test("SPARK_LOCAL_DIRS override also affects driver") {
// Regression test for SPARK-2975
assert(!new File("/NONEXISTENT_DIR").exists())
assert(!new File("/NONEXISTENT_PATH").exists())
// spark.local.dir only contains invalid directories, but that's not a problem since
// SPARK_LOCAL_DIRS will override it on both the driver and workers:
val conf = new SparkConfWithEnv(Map("SPARK_LOCAL_DIRS" -> System.getProperty("java.io.tmpdir")))
Expand All @@ -52,8 +52,8 @@ class LocalDirsSuite extends SparkFunSuite with BeforeAndAfter {
}

test("Utils.getLocalDir() throws an exception if any temporary directory cannot be retrieved") {
assert(!new File("/NONEXISTENT_DIR_ONE").exists())
assert(!new File("/NONEXISTENT_DIR_TWO").exists())
assert(!new File("/NONEXISTENT_PATH_ONE").exists())
assert(!new File("/NONEXISTENT_PATH_TWO").exists())
val conf = new SparkConf(false)
.set("spark.local.dir", "/NONEXISTENT_PATH_ONE,/NONEXISTENT_PATH_TWO")
val message = intercept[IOException] {
Expand Down

0 comments on commit bf21e3b

Please sign in to comment.