Skip to content
Snippets Groups Projects
Commit 601032f5 authored by Zongheng Yang's avatar Zongheng Yang Committed by Michael Armbrust
Browse files

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.
parent a2052a44
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -402,6 +402,7 @@ class SQLQuerySuite extends QueryTest {
sql(s"SET $nonexistentKey"),
Seq(Seq(s"$nonexistentKey is undefined"))
)
clear()
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment