You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ya...@apache.org on 2022/04/19 05:09:35 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #2021][FOLLOWUP] Move derby workaround to test code
This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new bafc2f84a [KYUUBI #2021][FOLLOWUP] Move derby workaround to test code
bafc2f84a is described below
commit bafc2f84a2584f6e728dd4aad6f7b9e5f2db83ad
Author: Kent Yao <ya...@apache.org>
AuthorDate: Tue Apr 19 13:09:25 2022 +0800
[KYUUBI #2021][FOLLOWUP] Move derby workaround to test code
### _Why are the changes needed?_
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #2415 from yaooqinn/2021.
Closes #2021
12d39951 [Kent Yao] [KYUUBI #2021][FOLLOWUP] Move debery workaround to test code
Authored-by: Kent Yao <ya...@apache.org>
Signed-off-by: Kent Yao <ya...@apache.org>
---
.../main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala | 7 -------
.../apache/kyuubi/engine/hive/operation/HiveOperationSuite.scala | 9 +++++++--
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala
index 75cc5c715..f9cf00cb2 100644
--- a/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala
+++ b/externals/kyuubi-hive-sql-engine/src/main/scala/org/apache/kyuubi/engine/hive/HiveSQLEngine.scala
@@ -83,13 +83,6 @@ object HiveSQLEngine extends Logging {
"hive.metastore.warehouse.dir",
Utils.createTempDir(namePrefix = "kyuubi_hive_warehouse").toString)
hiveConf.set("hive.metastore.fastpath", "true")
-
- // TODO: Move this to test phase after #2021 resolved
- val metastore = Utils.createTempDir(namePrefix = "hms_temp")
- metastore.toFile.delete()
- hiveConf.set(
- "javax.jdo.option.ConnectionURL",
- s"jdbc:derby:;databaseName=$metastore;create=true")
}
val engine = new HiveSQLEngine()
diff --git a/externals/kyuubi-hive-sql-engine/src/test/scala/org/apache/kyuubi/engine/hive/operation/HiveOperationSuite.scala b/externals/kyuubi-hive-sql-engine/src/test/scala/org/apache/kyuubi/engine/hive/operation/HiveOperationSuite.scala
index 63911b207..36b6482d6 100644
--- a/externals/kyuubi-hive-sql-engine/src/test/scala/org/apache/kyuubi/engine/hive/operation/HiveOperationSuite.scala
+++ b/externals/kyuubi-hive-sql-engine/src/test/scala/org/apache/kyuubi/engine/hive/operation/HiveOperationSuite.scala
@@ -17,13 +17,18 @@
package org.apache.kyuubi.engine.hive.operation
-import org.apache.kyuubi.HiveEngineTests
+import org.apache.kyuubi.{HiveEngineTests, Utils}
import org.apache.kyuubi.engine.hive.HiveSQLEngine
class HiveOperationSuite extends HiveEngineTests {
override def beforeAll(): Unit = {
- HiveSQLEngine.startEngine()
+ val metastore = Utils.createTempDir(namePrefix = getClass.getSimpleName)
+ metastore.toFile.delete()
+ val args = Array(
+ "--conf",
+ s"javax.jdo.option.ConnectionURL=jdbc:derby:;databaseName=$metastore;create=true")
+ HiveSQLEngine.main(args)
super.beforeAll()
}