mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add testcase for issue #1717
This commit is contained in:
@@ -28,4 +28,16 @@ public class JdbcUtils_driver extends TestCase {
|
||||
|
||||
Assert.assertEquals(JdbcConstants.ODPS, JdbcUtils.getDbType(url, className));
|
||||
}
|
||||
|
||||
public void test_log4jdbc_mysql() {
|
||||
String jdbcUrl = "jdbc:log4jdbc:mysql://localhost:8066/test";
|
||||
String dbType = JdbcUtils.getDbType(jdbcUrl, null);
|
||||
assertEquals("not support log4jdbc mysql, url like jdbc:log4jdbc:mysql:...", JdbcConstants.MYSQL, dbType);
|
||||
}
|
||||
|
||||
public void test_log4jdbc_mysql2() throws Exception {
|
||||
String jdbcUrl = "jdbc:log4jdbc:mysql://localhost:8066/test";
|
||||
String dbType = JdbcUtils.getDbType(jdbcUrl, "net.sf.log4jdbc.DriverSpy");
|
||||
assertEquals("not support log4jdbc mysql, url like jdbc:log4jdbc:mysql:...", JdbcConstants.MYSQL, dbType);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user