diff options
author | Prashant Sharma <prashant.s@imaginea.com> | 2013-09-10 10:57:47 +0530 |
---|---|---|
committer | Prashant Sharma <prashant.s@imaginea.com> | 2013-09-10 10:57:47 +0530 |
commit | 6fcfefcb278ffb9d54452d3336cb74b97480fbf5 (patch) | |
tree | b624976148364117e70faa6fe50b7d926c98a8bc | |
parent | 4106ae9fbf8a582697deba2198b3b966dec00bfe (diff) | |
download | spark-6fcfefcb278ffb9d54452d3336cb74b97480fbf5.tar.gz spark-6fcfefcb278ffb9d54452d3336cb74b97480fbf5.tar.bz2 spark-6fcfefcb278ffb9d54452d3336cb74b97480fbf5.zip |
Few more fixes to tests broken during merge
-rw-r--r-- | repl/src/test/scala/org/apache/spark/repl/ReplSuiteMixin.scala | 50 | ||||
-rw-r--r-- | streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala | 6 |
2 files changed, 3 insertions, 53 deletions
diff --git a/repl/src/test/scala/org/apache/spark/repl/ReplSuiteMixin.scala b/repl/src/test/scala/org/apache/spark/repl/ReplSuiteMixin.scala deleted file mode 100644 index ccfbf5193a..0000000000 --- a/repl/src/test/scala/org/apache/spark/repl/ReplSuiteMixin.scala +++ /dev/null @@ -1,50 +0,0 @@ -package org.apache.spark.repl - -import java.io.BufferedReader -import java.io.PrintWriter -import java.io.StringReader -import java.io.StringWriter -import java.net.URLClassLoader - -import scala.collection.mutable.ArrayBuffer -import scala.concurrent.ExecutionContext.Implicits.global -import scala.concurrent.future - - -trait ReplSuiteMixin { - def runInterpreter(master: String, input: String): String = { - val in = new BufferedReader(new StringReader(input + "\n")) - val out = new StringWriter() - val cl = getClass.getClassLoader - var paths = new ArrayBuffer[String] - if (cl.isInstanceOf[URLClassLoader]) { - val urlLoader = cl.asInstanceOf[URLClassLoader] - for (url <- urlLoader.getURLs) { - if (url.getProtocol == "file") { - paths += url.getFile - } - } - } - - val interp = new SparkILoop(in, new PrintWriter(out), master) - spark.repl.Main.interp = interp - val separator = System.getProperty("path.separator") - interp.process(Array("-classpath", paths.mkString(separator))) - if (interp != null) { - interp.closeInterpreter() - } - // To avoid Akka rebinding to the same port, since it doesn't unbind immediately on shutdown - System.clearProperty("spark.hostPort") - return out.toString - } - - def assertContains(message: String, output: String) { - assert(output contains message, - "Interpreter output did not contain '" + message + "':\n" + output) - } - - def assertDoesNotContain(message: String, output: String) { - assert(!(output contains message), - "Interpreter output contained '" + message + "':\n" + output) - } -} diff --git a/streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala index b8337ed423..07de51bebb 100644 --- a/streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala +++ b/streaming/src/test/scala/org/apache/spark/streaming/CheckpointSuite.scala @@ -29,9 +29,9 @@ import org.scalatest.BeforeAndAfter import com.google.common.io.Files -import spark.streaming.StreamingContext.toPairDStreamFunctions -import spark.streaming.dstream.FileInputDStream -import spark.streaming.util.ManualClock +import org.apache.spark.streaming.StreamingContext.toPairDStreamFunctions +import org.apache.spark.streaming.dstream.FileInputDStream +import org.apache.spark.streaming.util.ManualClock |