diff options
author | tone-zhang <tone.zhang@linaro.org> | 2016-09-11 10:17:53 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-09-11 10:17:53 +0100 |
commit | bf22217377d7fe95b436d8b563c501aab2797f78 (patch) | |
tree | 7de2d7e2110dc6c0ea9d5c42a76747f82b9a1be0 /sql/core | |
parent | 180796ecb3a00facde2d98affdb5aa38dd258875 (diff) | |
download | spark-bf22217377d7fe95b436d8b563c501aab2797f78.tar.gz spark-bf22217377d7fe95b436d8b563c501aab2797f78.tar.bz2 spark-bf22217377d7fe95b436d8b563c501aab2797f78.zip |
[SPARK-17330][SPARK UT] Clean up spark-warehouse in UT
## What changes were proposed in this pull request?
Check the database warehouse used in Spark UT, and remove the existing database file before run the UT (SPARK-8368).
## How was this patch tested?
Run Spark UT with the command for several times:
./build/sbt -Pyarn -Phadoop-2.6 -Phive -Phive-thriftserver "test-only *HiveSparkSubmitSuit*"
Without the patch, the test case can be passed only at the first time, and always failed from the second time.
With the patch the test case always can be passed correctly.
Author: tone-zhang <tone.zhang@linaro.org>
Closes #14894 from tone-zhang/issue1.
Diffstat (limited to 'sql/core')
-rw-r--r-- | sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala index 05f826a11b..95672e01f5 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala @@ -43,6 +43,8 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach { // drop all databases, tables and functions after each test spark.sessionState.catalog.reset() } finally { + val path = System.getProperty("user.dir") + "/spark-warehouse" + Utils.deleteRecursively(new File(path)) super.afterEach() } } |