diff options
author | Prashant Sharma <prashant@apache.org> | 2014-07-22 00:38:26 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-07-22 00:38:26 -0700 |
commit | 81fec9922c5a1a44e086fba450c3eea03cddce63 (patch) | |
tree | fac923f4a6e064d9796fd108b737f47b6b1b6d57 /repl/src/test | |
parent | 5d16d5bbfd242c16ee0d6952c48dcd90651f8ae2 (diff) | |
download | spark-81fec9922c5a1a44e086fba450c3eea03cddce63.tar.gz spark-81fec9922c5a1a44e086fba450c3eea03cddce63.tar.bz2 spark-81fec9922c5a1a44e086fba450c3eea03cddce63.zip |
[SPARK-2452] Create a new valid for each instead of using lineId.
Author: Prashant Sharma <prashant@apache.org>
Closes #1441 from ScrapCodes/SPARK-2452/multi-statement and squashes the following commits:
26c5c72 [Prashant Sharma] Added a test case.
7e8d28d [Prashant Sharma] SPARK-2452, create a new valid for each instead of using lineId, because Line ids can be same sometimes.
Diffstat (limited to 'repl/src/test')
-rw-r--r-- | repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala b/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala index f2aa42dbcb..e2d8d5ff38 100644 --- a/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala +++ b/repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala @@ -235,7 +235,7 @@ class ReplSuite extends FunSuite { assertContains("res4: Array[Int] = Array(0, 0, 0, 0, 0)", output) } - test("SPARK-1199-simple-reproduce") { + test("SPARK-1199 two instances of same class don't type check.") { val output = runInterpreter("local-cluster[1,1,512]", """ |case class Sum(exp: String, exp2: String) @@ -247,6 +247,15 @@ class ReplSuite extends FunSuite { assertDoesNotContain("Exception", output) } + test("SPARK-2452 compound statements.") { + val output = runInterpreter("local", + """ + |val x = 4 ; def f() = x + |f() + """.stripMargin) + assertDoesNotContain("error:", output) + assertDoesNotContain("Exception", output) + } if (System.getenv("MESOS_NATIVE_LIBRARY") != null) { test("running on Mesos") { val output = runInterpreter("localquiet", |