This commit is contained in:
Looly 2023-12-04 23:49:07 +08:00
parent 301968cbbc
commit 945afcc0df

View File

@ -13,7 +13,6 @@
package org.dromara.hutool.db.driver;
import org.dromara.hutool.core.util.RandomUtil;
import org.dromara.hutool.db.driver.DriverUtil;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@ -25,7 +24,7 @@ public class DriverUtilTest {
@Test
public void identifyH2DriverTest(){
final String url = "jdbc:h2:file:./db/test;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;MODE=MYSQL";
final String driver = DriverUtil.identifyDriver(url); // driver 返回 mysql driver
final String driver = DriverUtil.identifyDriver(url); // driver 返回 h2 driver
Assertions.assertEquals("org.h2.Driver", driver);
}