spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwend...@apache.org
Subject [07/10] git commit: Restored the previously removed test
Date Sat, 04 Jan 2014 07:50:45 GMT
Restored the previously removed test


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/bc311bb8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/bc311bb8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/bc311bb8

Branch: refs/heads/master
Commit: bc311bb826b5548b9c4c55320711f3b18dc19397
Parents: 94f2fff
Author: Prashant Sharma <prashant.s@imaginea.com>
Authored: Fri Jan 3 14:52:37 2014 +0530
Committer: Prashant Sharma <prashant.s@imaginea.com>
Committed: Fri Jan 3 14:52:37 2014 +0530

----------------------------------------------------------------------
 .../test/scala/org/apache/spark/FileServerSuite.scala  | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/bc311bb8/core/src/test/scala/org/apache/spark/FileServerSuite.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/org/apache/spark/FileServerSuite.scala b/core/src/test/scala/org/apache/spark/FileServerSuite.scala
index a15c375..506f748 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")
+      }
+    }
+  }
+
 }


Mime
View raw message