mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for validateConnection
This commit is contained in:
@@ -325,16 +325,8 @@ public class DataSourceTest3 extends TestCase {
|
||||
dataSource.setValidationQuery(null);
|
||||
dataSource.setValidConnectionChecker(new MySqlValidConnectionChecker());
|
||||
|
||||
{
|
||||
Exception error = null;
|
||||
try {
|
||||
DruidPooledConnection conn = dataSource.getConnection().unwrap(DruidPooledConnection.class);
|
||||
dataSource.validateConnection(conn);
|
||||
} catch (SQLException ex) {
|
||||
error = ex;
|
||||
}
|
||||
Assert.assertNotNull(error);
|
||||
}
|
||||
|
||||
DruidPooledConnection conn = dataSource.getConnection().unwrap(DruidPooledConnection.class);
|
||||
dataSource.validateConnection(conn);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user