Skip to content
Snippets Groups Projects
Commit bc311bb8 authored by Prashant Sharma's avatar Prashant Sharma
Browse files

Restored the previously removed test

parent 94f2fffa
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ class FileServerSuite extends FunSuite with LocalSparkContext {
in.close()
jar.close()
stream.close()
testJarFile = tmpFile2.getAbsolutePath
testJarFile = tmpFile2.toURI.toURL.toString
}
override def beforeEach() {
......@@ -142,4 +142,15 @@ class FileServerSuite extends FunSuite with LocalSparkContext {
}
}
test ("Dynamically adding JARS on a standalone cluster using local: URL") {
sc = new SparkContext("local-cluster[1,1,512]", "test")
sc.addJar(testJarFile.replace("file", "local"))
val testData = Array((1,1))
sc.parallelize(testData).foreach { (x) =>
if (Thread.currentThread.getContextClassLoader.getResource("FileServerSuite2.txt") == null) {
throw new SparkException("jar not added")
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment