Skip to content

Commit

Permalink
Fix REPLSuite tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jan 29, 2016
1 parent 2c901e5 commit d24c31d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ object Main extends Logging {
}

def main(args: Array[String]) {
interp = new SparkILoop
doMain(args, new SparkILoop)
}

// Visible for testing
private[repl] def doMain(args: Array[String], _interp: SparkILoop): Unit = {
interp = _interp
val interpArguments = List(
"-Yrepl-class-based",
"-Yrepl-outdir", s"${outputDir.getAbsolutePath}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ class ReplSuite extends SparkFunSuite {
System.setProperty(CONF_EXECUTOR_CLASSPATH, classpath)

System.setProperty("spark.master", master)
val interp = {
new SparkILoop(in, new PrintWriter(out))
}
org.apache.spark.repl.Main.interp = interp
Main.main(Array("-classpath", classpath)) // call main
org.apache.spark.repl.Main.interp = null
Main.doMain(Array("-classpath", classpath), new SparkILoop(in, new PrintWriter(out)))

if (oldExecutorClasspath != null) {
System.setProperty(CONF_EXECUTOR_CLASSPATH, oldExecutorClasspath)
Expand Down

0 comments on commit d24c31d

Please sign in to comment.