spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marmb...@apache.org
Subject git commit: HOTFIX: clear() configs in SQLConf-related unit tests.
Date Wed, 11 Jun 2014 04:59:28 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.0 ac8c27bdf -> 2cdce7cf3


HOTFIX: clear() configs in SQLConf-related unit tests.

Thanks goes to @liancheng, who pointed out that `sql/test-only *.SQLConfSuite *.SQLQuerySuite`
passed but `sql/test-only *.SQLQuerySuite *.SQLConfSuite` failed. The reason is that some
tests use the same test keys and without clear()'ing, they get carried over to other tests.
This hotfix simply adds some `clear()` calls.

This problem was not evident on Jenkins before probably because `parallelExecution` is not
set to `false` for `sqlCoreSettings`.

Author: Zongheng Yang <zongheng.y@gmail.com>

Closes #1040 from concretevitamin/sqlconf-tests and squashes the following commits:

6d14ceb [Zongheng Yang] HOTFIX: clear() confs in SQLConf related unit tests.

(cherry picked from commit 601032f5bfe2dcdc240bfcc553f401e6facbf5ec)
Signed-off-by: Michael Armbrust <michael@databricks.com>


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

Branch: refs/heads/branch-1.0
Commit: 2cdce7cf35ffe48810920978b6f55be8a456e844
Parents: ac8c27b
Author: Zongheng Yang <zongheng.y@gmail.com>
Authored: Tue Jun 10 21:59:01 2014 -0700
Committer: Michael Armbrust <michael@databricks.com>
Committed: Tue Jun 10 21:59:19 2014 -0700

----------------------------------------------------------------------
 sql/core/src/test/scala/org/apache/spark/sql/SQLConfSuite.scala  | 2 ++
 sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala | 1 +
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/2cdce7cf/sql/core/src/test/scala/org/apache/spark/sql/SQLConfSuite.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLConfSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLConfSuite.scala
index 5eb73a4..08293f7 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/SQLConfSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLConfSuite.scala
@@ -28,6 +28,7 @@ class SQLConfSuite extends QueryTest {
   val testVal = "test.val.0"
 
   test("programmatic ways of basic setting and getting") {
+    clear()
     assert(getOption(testKey).isEmpty)
     assert(getAll.toSet === Set())
 
@@ -48,6 +49,7 @@ class SQLConfSuite extends QueryTest {
   }
 
   test("parse SQL set commands") {
+    clear()
     sql(s"set $testKey=$testVal")
     assert(get(testKey, testVal + "_") == testVal)
     assert(TestSQLContext.get(testKey, testVal + "_") == testVal)

http://git-wip-us.apache.org/repos/asf/spark/blob/2cdce7cf/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
index de02bbc..c1fc99f 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
@@ -402,6 +402,7 @@ class SQLQuerySuite extends QueryTest {
       sql(s"SET $nonexistentKey"),
       Seq(Seq(s"$nonexistentKey is undefined"))
     )
+    clear()
   }
 
 }


Mime
View raw message