mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
add testcase & bug fixed for DruidConnectionHolderInitError
This commit is contained in:
@@ -18,7 +18,7 @@ public class DruidConnectionHolderTest extends TestCase {
|
||||
dataSource = new DruidDataSource();
|
||||
dataSource.setUrl("jdbc:mock:xxx");
|
||||
dataSource.setTestOnBorrow(false);
|
||||
dataSource.setPoolPreparedStatements(true);
|
||||
dataSource.setInitialSize(1);
|
||||
dataSource.getProxyFilters().add(new FilterAdapter() {
|
||||
|
||||
public int connection_getTransactionIsolation(FilterChain chain, ConnectionProxy connection)
|
||||
@@ -34,7 +34,8 @@ public class DruidConnectionHolderTest extends TestCase {
|
||||
}
|
||||
|
||||
public void test_mysqlSyntaxError() throws Exception {
|
||||
Connection conn = dataSource.getConnection();
|
||||
conn.close();
|
||||
dataSource.init();
|
||||
|
||||
dataSource.getConnection();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user