diff options
author | Prashant Sharma <prashant.s@imaginea.com> | 2014-01-03 14:52:37 +0530 |
---|---|---|
committer | Prashant Sharma <prashant.s@imaginea.com> | 2014-01-03 14:52:37 +0530 |
commit | bc311bb826b5548b9c4c55320711f3b18dc19397 (patch) | |
tree | e61f3ac29184d1eaadfb3149296a4d543436352c /core/src | |
parent | 94f2fffa23436ed66a24c705f88dabe59bf54037 (diff) | |
download | spark-bc311bb826b5548b9c4c55320711f3b18dc19397.tar.gz spark-bc311bb826b5548b9c4c55320711f3b18dc19397.tar.bz2 spark-bc311bb826b5548b9c4c55320711f3b18dc19397.zip |
Restored the previously removed test
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/test/scala/org/apache/spark/FileServerSuite.scala | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/src/test/scala/org/apache/spark/FileServerSuite.scala b/core/src/test/scala/org/apache/spark/FileServerSuite.scala index a15c3751c2..506f7484fb 100644 --- a/core/src/test/scala/org/apache/spark/FileServerSuite.scala +++ b/core/src/test/scala/org/apache/spark/FileServerSuite.scala @@ -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") + } + } + } + } |