From 2613a1ba74951e75fd5dfb8f0d4e943ca9098e48 Mon Sep 17 00:00:00 2001 From: liangbowen Date: Sat, 14 Jan 2023 23:51:27 +0800 Subject: [PATCH] [KYUUBI #4148] Update class name of MySQL 8 JDBC driver used in kyuubi-server tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### _Why are the changes needed?_ Prefer MySQL JDBC driver's new class name `com.mysql.cj.jdbc.Driver` in testing. To eliminate this warning message in kyuubi-server‘s test runs: ``` [INFO] --- scalatest-maven-plugin:2.0.2:test (test) kyuubi-server_2.12 --- Discovery starting. Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. ``` ### _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 - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4148 from bowenliang123/test-mysql-driver-class. Closes #4148 70b1907a [liangbowen] use `com.mysql.cj.jdbc.Driver` for driver class name in MySQLJDBCTestHelper Authored-by: liangbowen Signed-off-by: Cheng Pan --- .../org/apache/kyuubi/server/mysql/MySQLJDBCTestHelper.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/mysql/MySQLJDBCTestHelper.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/mysql/MySQLJDBCTestHelper.scala index c258b6e69..a703b6b15 100644 --- a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/mysql/MySQLJDBCTestHelper.scala +++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/mysql/MySQLJDBCTestHelper.scala @@ -22,7 +22,7 @@ import org.apache.kyuubi.operation.JDBCTestHelper trait MySQLJDBCTestHelper extends JDBCTestHelper { - override def jdbcDriverClass: String = "com.mysql.jdbc.Driver" + override def jdbcDriverClass: String = "com.mysql.cj.jdbc.Driver" protected lazy val user: String = Utils.currentUser