You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/08/17 06:14:42 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #3239] [Subtask] DorisSQLEngine - Add integration tests

This is an automated email from the ASF dual-hosted git repository.

chengpan 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 3cf5a20b7 [KYUUBI #3239] [Subtask] DorisSQLEngine - Add integration tests
3cf5a20b7 is described below

commit 3cf5a20b7a9b1e58764a1ada981cb5a68b69e70e
Author: Min <zh...@163.com>
AuthorDate: Wed Aug 17 14:14:31 2022 +0800

    [KYUUBI #3239] [Subtask] DorisSQLEngine - Add integration tests
    
    ### _Why are the changes needed?_
    
    close https://github.com/apache/incubator-kyuubi/issues/3239#issue-1338893480
    ### _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 #3240 from zhaomin1423/jdbc_it.
    
    Closes #3239
    
    8da64f29 [Min] fix it
    24cceba2 [Min] add dependency
    b477326c [Min] add server to dependency
    e74aa93f [Min] fix getJdbcUrl conflict
    01e6a302 [Min] [KYUUBI #3239] [Subtask] DorisSQLEngine - Add integration tests
    
    Authored-by: Min <zh...@163.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .github/workflows/master.yml                       |   2 +-
 .../apache/kyuubi/engine/jdbc/WithJdbcEngine.scala |   2 +-
 .../engine/jdbc/doris/DorisOperationSuite.scala    |   4 +-
 ...Engine.scala => OperationWithEngineSuite.scala} |  13 +---
 .../kyuubi/engine/jdbc/doris/SessionSuite.scala    |   2 +-
 .../kyuubi/engine/jdbc/doris/StatementSuite.scala  |   2 +-
 .../kyuubi/engine/jdbc/doris/WithDorisEngine.scala |   3 +-
 integration-tests/kyuubi-jdbc-it/pom.xml           |  85 +++++++++++++++++++++
 .../src/test/resources/doris-compose.yml           |  35 +++++++++
 .../src/test/resources/log4j2-test.xml             |  43 +++++++++++
 .../mysql/mysql-connector-java-8.0.30.jar          | Bin 0 -> 2513563 bytes
 .../it/jdbc/doris/OperationWithServerSuite.scala   |  21 +----
 .../doris/WithKyuubiServerAndDorisContainer.scala  |  52 +++++--------
 integration-tests/pom.xml                          |   1 +
 14 files changed, 196 insertions(+), 69 deletions(-)

diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index 8857d22d4..bd598f916 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -208,7 +208,7 @@ jobs:
           check-latest: false
       - name: Build and test JDBC with maven w/o linters
         run: |
-          TEST_MODULES="externals/kyuubi-jdbc-engine" || echo 'TODO integration-tests/kyuubi-jdbc-it'
+          TEST_MODULES="externals/kyuubi-jdbc-engine,integration-tests/kyuubi-jdbc-it"
           ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} -am clean install -DskipTests
           ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} test
       - name: Upload test logs
diff --git a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/WithJdbcEngine.scala b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/WithJdbcEngine.scala
index b8ef93724..e9f533ffd 100644
--- a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/WithJdbcEngine.scala
+++ b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/WithJdbcEngine.scala
@@ -55,6 +55,6 @@ trait WithJdbcEngine extends KyuubiFunSuite {
     connectionUrl = engine.frontendServices.head.connectionUrl
   }
 
-  protected def getJdbcUrl: String = s"jdbc:hive2://$connectionUrl/;"
+  protected def jdbcConnectionUrl: String = s"jdbc:hive2://$connectionUrl/;"
 
 }
diff --git a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/DorisOperationSuite.scala b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/DorisOperationSuite.scala
index 4af943d0e..1259a1a92 100644
--- a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/DorisOperationSuite.scala
+++ b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/DorisOperationSuite.scala
@@ -23,7 +23,7 @@ import scala.collection.mutable.ArrayBuffer
 import org.apache.kyuubi.operation.HiveJDBCTestHelper
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
 
-class DorisOperationSuite extends WithDorisEngine with HiveJDBCTestHelper {
+abstract class DorisOperationSuite extends WithDorisEngine with HiveJDBCTestHelper {
   test("doris - get tables") {
     case class Table(catalog: String, schema: String, tableName: String, tableType: String)
 
@@ -258,6 +258,4 @@ class DorisOperationSuite extends WithDorisEngine with HiveJDBCTestHelper {
       statement.execute("drop database db2")
     }
   }
-
-  override protected def jdbcUrl: String = getJdbcUrl
 }
diff --git a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/WithDorisEngine.scala b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/OperationWithEngineSuite.scala
similarity index 63%
copy from externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/WithDorisEngine.scala
copy to externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/OperationWithEngineSuite.scala
index 8ab37ae29..1d1414798 100644
--- a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/WithDorisEngine.scala
+++ b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/OperationWithEngineSuite.scala
@@ -16,16 +16,9 @@
  */
 package org.apache.kyuubi.engine.jdbc.doris
 
-import org.apache.kyuubi.config.KyuubiConf._
-import org.apache.kyuubi.engine.jdbc.WithJdbcEngine
+import org.apache.kyuubi.operation.HiveJDBCTestHelper
 
-trait WithDorisEngine extends WithJdbcEngine with WithDorisContainer {
+class OperationWithEngineSuite extends DorisOperationSuite with HiveJDBCTestHelper {
 
-  override def withKyuubiConf: Map[String, String] = Map(
-    ENGINE_SHARE_LEVEL.key -> "SERVER",
-    ENGINE_JDBC_CONNECTION_URL.key -> s"jdbc:mysql://$feUrl",
-    ENGINE_JDBC_CONNECTION_USER.key -> "root",
-    ENGINE_JDBC_CONNECTION_PASSWORD.key -> "",
-    ENGINE_TYPE.key -> "jdbc",
-    ENGINE_JDBC_SHORT_NAME.key -> "doris")
+  override protected def jdbcUrl: String = jdbcConnectionUrl
 }
diff --git a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/SessionSuite.scala b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/SessionSuite.scala
index e3963d626..a8204105f 100644
--- a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/SessionSuite.scala
+++ b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/SessionSuite.scala
@@ -35,5 +35,5 @@ class SessionSuite extends WithDorisEngine with HiveJDBCTestHelper {
     }
   }
 
-  override protected def jdbcUrl: String = getJdbcUrl
+  override protected def jdbcUrl: String = jdbcConnectionUrl
 }
diff --git a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/StatementSuite.scala b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/StatementSuite.scala
index 05d88dc2b..adb748008 100644
--- a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/StatementSuite.scala
+++ b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/StatementSuite.scala
@@ -90,5 +90,5 @@ class StatementSuite extends WithDorisEngine with HiveJDBCTestHelper {
     }
   }
 
-  override protected def jdbcUrl: String = getJdbcUrl
+  override protected def jdbcUrl: String = jdbcConnectionUrl
 }
diff --git a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/WithDorisEngine.scala b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/WithDorisEngine.scala
index 8ab37ae29..9945fb640 100644
--- a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/WithDorisEngine.scala
+++ b/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/WithDorisEngine.scala
@@ -27,5 +27,6 @@ trait WithDorisEngine extends WithJdbcEngine with WithDorisContainer {
     ENGINE_JDBC_CONNECTION_USER.key -> "root",
     ENGINE_JDBC_CONNECTION_PASSWORD.key -> "",
     ENGINE_TYPE.key -> "jdbc",
-    ENGINE_JDBC_SHORT_NAME.key -> "doris")
+    ENGINE_JDBC_SHORT_NAME.key -> "doris",
+    ENGINE_JDBC_DRIVER_CLASS.key -> "com.mysql.cj.jdbc.Driver")
 }
diff --git a/integration-tests/kyuubi-jdbc-it/pom.xml b/integration-tests/kyuubi-jdbc-it/pom.xml
new file mode 100644
index 000000000..a887eb324
--- /dev/null
+++ b/integration-tests/kyuubi-jdbc-it/pom.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>integration-tests</artifactId>
+        <groupId>org.apache.kyuubi</groupId>
+        <version>1.6.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>kyuubi-jdbc-it_2.12</artifactId>
+    <name>Kyuubi Test Jdbc IT</name>
+    <url>https://kyuubi.apache.org/</url>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.kyuubi</groupId>
+            <artifactId>kyuubi-common_${scala.binary.version}</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.kyuubi</groupId>
+            <artifactId>kyuubi-jdbc-engine_${scala.binary.version}</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.kyuubi</groupId>
+            <artifactId>kyuubi-jdbc-engine_${scala.binary.version}</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.kyuubi</groupId>
+            <artifactId>kyuubi-server_${scala.binary.version}</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.kyuubi</groupId>
+            <artifactId>kyuubi-server_${scala.binary.version}</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.kyuubi</groupId>
+            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.dimafeng</groupId>
+            <artifactId>testcontainers-scala-scalatest_${scala.binary.version}</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/integration-tests/kyuubi-jdbc-it/src/test/resources/doris-compose.yml b/integration-tests/kyuubi-jdbc-it/src/test/resources/doris-compose.yml
new file mode 100644
index 000000000..184595462
--- /dev/null
+++ b/integration-tests/kyuubi-jdbc-it/src/test/resources/doris-compose.yml
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+version: "3"
+services:
+  doris-fe:
+    # https://hub.docker.com/repository/docker/zhaomin1423/doris-fe
+    image: zhaomin1423/doris-fe:1.0.0
+    ports:
+      - "9030"
+
+  doris-be:
+    # https://hub.docker.com/repository/docker/zhaomin1423/doris-be
+    image: zhaomin1423/doris-be:1.0.0-0.1
+    ports:
+      - "8040"
+    depends_on:
+      - doris-fe
+    entrypoint: /opt/entrypoint.sh
+
+  
\ No newline at end of file
diff --git a/integration-tests/kyuubi-jdbc-it/src/test/resources/log4j2-test.xml b/integration-tests/kyuubi-jdbc-it/src/test/resources/log4j2-test.xml
new file mode 100644
index 000000000..bfc40dd6d
--- /dev/null
+++ b/integration-tests/kyuubi-jdbc-it/src/test/resources/log4j2-test.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<!-- Extra logging related to initialization of Log4j. 
+ Set to debug or trace if log4j initialization is failing. -->
+<Configuration status="WARN">
+    <Appenders>
+        <Console name="stdout" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} %p %c: %m%n"/>
+            <Filters>
+                <ThresholdFilter level="FATAL"/>
+                <RegexFilter regex=".*Thrift error occurred during processing of message.*" onMatch="DENY" onMismatch="NEUTRAL"/>
+            </Filters>
+        </Console>
+        <File name="file" fileName="target/unit-tests.log">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} %t %p %c{1}: %m%n"/>
+            <Filters>
+                <RegexFilter regex=".*Thrift error occurred during processing of message.*" onMatch="DENY" onMismatch="NEUTRAL"/>
+            </Filters>
+        </File>
+    </Appenders>
+    <Loggers>
+        <Root level="INFO">
+            <AppenderRef ref="stdout"/>
+            <AppenderRef ref="file"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git a/integration-tests/kyuubi-jdbc-it/src/test/resources/mysql/mysql-connector-java-8.0.30.jar b/integration-tests/kyuubi-jdbc-it/src/test/resources/mysql/mysql-connector-java-8.0.30.jar
new file mode 100644
index 000000000..92ebe1b54
Binary files /dev/null and b/integration-tests/kyuubi-jdbc-it/src/test/resources/mysql/mysql-connector-java-8.0.30.jar differ
diff --git a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/SessionSuite.scala b/integration-tests/kyuubi-jdbc-it/src/test/scala/org/apache/kyuubi/it/jdbc/doris/OperationWithServerSuite.scala
similarity index 60%
copy from externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/SessionSuite.scala
copy to integration-tests/kyuubi-jdbc-it/src/test/scala/org/apache/kyuubi/it/jdbc/doris/OperationWithServerSuite.scala
index e3963d626..00bec0fdb 100644
--- a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/doris/SessionSuite.scala
+++ b/integration-tests/kyuubi-jdbc-it/src/test/scala/org/apache/kyuubi/it/jdbc/doris/OperationWithServerSuite.scala
@@ -14,26 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.kyuubi.engine.jdbc.doris
 
-import org.apache.kyuubi.operation.HiveJDBCTestHelper
+package org.apache.kyuubi.it.jdbc.doris
 
-class SessionSuite extends WithDorisEngine with HiveJDBCTestHelper {
+import org.apache.kyuubi.engine.jdbc.doris.DorisOperationSuite
 
-  test("test session") {
-    withJdbcStatement() { statement =>
-      val resultSet = statement.executeQuery(
-        "select '1' as id")
-      val metadata = resultSet.getMetaData
-      for (i <- 1 to metadata.getColumnCount) {
-        assert(metadata.getColumnName(i) == "id")
-      }
-      while (resultSet.next()) {
-        val id = resultSet.getObject(1)
-        assert(id == "1")
-      }
-    }
-  }
+class OperationWithServerSuite extends DorisOperationSuite with WithKyuubiServerAndDorisContainer {
 
   override protected def jdbcUrl: String = getJdbcUrl
+
 }
diff --git a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/WithJdbcEngine.scala b/integration-tests/kyuubi-jdbc-it/src/test/scala/org/apache/kyuubi/it/jdbc/doris/WithKyuubiServerAndDorisContainer.scala
similarity index 50%
copy from externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/WithJdbcEngine.scala
copy to integration-tests/kyuubi-jdbc-it/src/test/scala/org/apache/kyuubi/it/jdbc/doris/WithKyuubiServerAndDorisContainer.scala
index b8ef93724..ef41108ae 100644
--- a/externals/kyuubi-jdbc-engine/src/test/scala/org/apache/kyuubi/engine/jdbc/WithJdbcEngine.scala
+++ b/integration-tests/kyuubi-jdbc-it/src/test/scala/org/apache/kyuubi/it/jdbc/doris/WithKyuubiServerAndDorisContainer.scala
@@ -14,47 +14,31 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.kyuubi.engine.jdbc
 
-import org.apache.kyuubi.KyuubiFunSuite
-import org.apache.kyuubi.config.KyuubiConf
+package org.apache.kyuubi.it.jdbc.doris
 
-trait WithJdbcEngine extends KyuubiFunSuite {
+import org.apache.kyuubi.{Utils, WithKyuubiServer}
+import org.apache.kyuubi.config.KyuubiConf
+import org.apache.kyuubi.config.KyuubiConf.{ENGINE_JDBC_EXTRA_CLASSPATH, KYUUBI_ENGINE_ENV_PREFIX, KYUUBI_HOME}
+import org.apache.kyuubi.engine.jdbc.doris.WithDorisEngine
 
-  protected var engine: JdbcSQLEngine = _
-  protected var connectionUrl: String = _
+trait WithKyuubiServerAndDorisContainer extends WithKyuubiServer with WithDorisEngine {
 
-  protected val kyuubiConf: KyuubiConf = JdbcSQLEngine.kyuubiConf
+  private val kyuubiHome: String = Utils
+    .getCodeSourceLocation(getClass).split("integration-tests").head
 
-  def withKyuubiConf: Map[String, String]
+  override protected val conf: KyuubiConf = {
+    KyuubiConf()
+      .set(s"$KYUUBI_ENGINE_ENV_PREFIX.$KYUUBI_HOME", kyuubiHome)
+      .set(
+        ENGINE_JDBC_EXTRA_CLASSPATH,
+        getClass.getClassLoader.getResource(
+          "mysql/mysql-connector-java-8.0.30.jar").toURI.getPath)
+  }
 
   override def beforeAll(): Unit = {
+    val configs = withKyuubiConf
+    configs.foreach(config => conf.set(config._1, config._2))
     super.beforeAll()
-    startJdbcEngine()
   }
-
-  override def afterAll(): Unit = {
-    stopJdbcEngine()
-    super.afterAll()
-  }
-
-  def stopJdbcEngine(): Unit = {
-    if (engine != null) {
-      engine.stop()
-      engine = null
-    }
-  }
-
-  def startJdbcEngine(): Unit = {
-    withKyuubiConf.foreach { case (k, v) =>
-      System.setProperty(k, v)
-      kyuubiConf.set(k, v)
-    }
-    JdbcSQLEngine.startEngine()
-    engine = JdbcSQLEngine.currentEngine.get
-    connectionUrl = engine.frontendServices.head.connectionUrl
-  }
-
-  protected def getJdbcUrl: String = s"jdbc:hive2://$connectionUrl/;"
-
 }
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index f673fa737..a1d374a2f 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -35,6 +35,7 @@
         <module>kyuubi-flink-it</module>
         <module>kyuubi-hive-it</module>
         <module>kyuubi-trino-it</module>
+        <module>kyuubi-jdbc-it</module>
     </modules>
 
     <profiles>