use of com.alibaba.druid.proxy.jdbc.DataSourceProxyConfig in project druid by alibaba.
the class LogFilterTest method test_logFilter_0.
public void test_logFilter_0() throws Exception {
DataSourceProxyConfig config = new DataSourceProxyConfig();
config.setRawUrl("jdbc:mock:");
DataSourceProxyImpl dataSource = new DataSourceProxyImpl(new MockDriver(), config);
Log4jFilter log4jFilter = new Log4jFilter();
log4jFilter.init(dataSource);
config.getFilters().add(log4jFilter);
setLogDisableAll(log4jFilter, true);
CommonsLogFilter commonLogFilter = new CommonsLogFilter() {
@Override
public boolean isDataSourceLogEnabled() {
return true;
}
@Override
public boolean isConnectionLogEnabled() {
return true;
}
@Override
public boolean isStatementLogEnabled() {
return true;
}
@Override
public boolean isResultSetLogEnabled() {
return true;
}
@Override
public boolean isResultSetLogErrorEnabled() {
return true;
}
@Override
public boolean isResultSetNextAfterLogEnabled() {
return true;
}
};
commonLogFilter.init(dataSource);
config.getFilters().add(commonLogFilter);
setLogDisableAll(commonLogFilter, false);
executeSQL(dataSource);
}
use of com.alibaba.druid.proxy.jdbc.DataSourceProxyConfig in project druid by alibaba.
the class ResultSetProxyImplTest method test_resultset.
public void test_resultset() throws Exception {
MockDriver driver = new MockDriver();
DataSourceProxyConfig config = new DataSourceProxyConfig();
config.setUrl("");
config.setRawUrl("jdbc:mock:");
DataSourceProxyImpl dataSource = new DataSourceProxyImpl(driver, config);
{
StatFilter filter = new StatFilter();
filter.init(dataSource);
config.getFilters().add(filter);
}
{
Log4jFilter filter = new Log4jFilter();
filter.init(dataSource);
config.getFilters().add(filter);
}
Connection conn = dataSource.connect(null);
conn.setClientInfo("name", null);
Statement stmt = conn.createStatement();
ResultSetProxy rs = (ResultSetProxy) stmt.executeQuery(sql);
rs.insertRow();
rs.refreshRow();
rs.moveToInsertRow();
rs.moveToCurrentRow();
rs.next();
rs.updateRef(1, null);
rs.updateArray(1, null);
rs.updateRowId(1, null);
rs.updateNString(1, null);
rs.updateNClob(1, (NClob) null);
rs.updateNClob(1, (Reader) null);
rs.updateNClob(1, (Reader) null, 0);
rs.updateSQLXML(1, null);
rs.updateNCharacterStream(1, null);
rs.updateNCharacterStream(1, null, 0);
rs.getArray("1");
rs.updateRef("1", null);
rs.updateArray("1", null);
rs.updateRowId("1", null);
rs.updateNString("1", null);
rs.updateNClob("1", (NClob) null);
rs.updateNClob("1", (Reader) null);
rs.updateNClob("1", (Reader) null, 0);
rs.updateSQLXML("1", null);
rs.updateNCharacterStream("1", null);
rs.updateNCharacterStream("1", null, 0);
}
use of com.alibaba.druid.proxy.jdbc.DataSourceProxyConfig in project druid by alibaba.
the class CounterFilterTest method test_count_filter.
public void test_count_filter() throws Exception {
DataSourceProxyConfig config = new DataSourceProxyConfig();
config.setUrl("");
config.setRawUrl("jdbc:mock:");
StatFilter filter = new StatFilter();
MockDriver driver = new MockDriver();
DataSourceProxyImpl dataSource = new DataSourceProxyImpl(driver, config);
filter.init(dataSource);
config.getFilters().add(filter);
Connection conn = dataSource.connect(null);
Statement stmt = conn.createStatement();
ResultSetProxy rs = (ResultSetProxy) stmt.executeQuery(sql);
rs.close();
stmt.close();
conn.close();
conn.close();
dataSource.getCompositeData();
dataSource.getProperties();
dataSource.getDataSourceMBeanDomain();
}
use of com.alibaba.druid.proxy.jdbc.DataSourceProxyConfig in project druid by alibaba.
the class CounterFilterTest method test_countFilter.
public void test_countFilter() throws Exception {
DataSourceProxyConfig config = new DataSourceProxyConfig();
config.setUrl("");
DataSourceProxyImpl dataSource = new DataSourceProxyImpl(null, config);
JdbcDataSourceStat dataSourceStat = dataSource.getDataSourceStat();
StatFilter filter = new StatFilter();
filter.init(dataSource);
dataSourceStat.reset();
Assert.assertNull(StatFilter.getStatFilter(dataSource));
Assert.assertNull(dataSourceStat.getSqlStat(Integer.MAX_VALUE));
Assert.assertNull(dataSourceStat.getConnectionStat().getConnectLastTime());
FilterChain chain = new FilterChainImpl(dataSource) {
public ConnectionProxy connection_connect(Properties info) throws SQLException {
throw new SQLException();
}
};
Exception error = null;
try {
filter.connection_connect(chain, new Properties());
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
Assert.assertEquals(1, dataSourceStat.getConnectionStat().getConnectErrorCount());
Assert.assertNotNull(dataSourceStat.getConnectionStat().getConnectLastTime());
}
use of com.alibaba.druid.proxy.jdbc.DataSourceProxyConfig in project druid by alibaba.
the class JdbcFilterEventAdapterTest method test_filterEventAdapter.
public void test_filterEventAdapter() throws Exception {
DataSourceProxyConfig config = new DataSourceProxyConfig();
DataSourceProxy dataSource = new DataSourceProxyImpl(null, config);
FilterEventAdapter filter = new FilterEventAdapter() {
};
String sql = "SELECT * FROM PATROL";
ConnectionProxy connection = new ConnectionProxyImpl(dataSource, null, new Properties(), 1001);
final PreparedStatementProxy statement = new PreparedStatementProxyImpl(connection, null, sql, 1002);
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, int autoGeneratedKeys) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, Statement.NO_GENERATED_KEYS);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, int autoGeneratedKeys) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, Statement.NO_GENERATED_KEYS);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, int autoGeneratedKeys) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, Statement.NO_GENERATED_KEYS);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, int[] columnIndexes) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, new int[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, int[] columnIndexes) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, new int[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, int[] columnIndexes) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, new int[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, String[] columnNames) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, new String[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, String[] columnNames) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, new String[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean statement_execute(StatementProxy statement, String sql, String[] columnNames) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_execute(chain, statement, sql, new String[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int[] statement_executeBatch(StatementProxy statement) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_executeBatch(chain, statement);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int[] statement_executeBatch(StatementProxy statement) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_executeBatch(chain, statement);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int[] statement_executeBatch(StatementProxy statement) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_executeBatch(chain, statement);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public ResultSetProxy statement_executeQuery(StatementProxy statement, String sql) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_executeQuery(chain, statement, sql);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public ResultSetProxy statement_executeQuery(StatementProxy statement, String sql) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_executeQuery(chain, statement, sql);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public ResultSetProxy statement_executeQuery(StatementProxy statement, String sql) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_executeQuery(chain, statement, sql);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int preparedStatement_executeUpdate(PreparedStatementProxy statement) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.preparedStatement_executeUpdate(chain, statement);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int preparedStatement_executeUpdate(PreparedStatementProxy statement) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.preparedStatement_executeUpdate(chain, statement);
} catch (RuntimeException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int preparedStatement_executeUpdate(PreparedStatementProxy statement) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.preparedStatement_executeUpdate(chain, statement);
} catch (Error ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql);
} catch (RuntimeException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql);
} catch (Error ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, int autoGeneratedKeys) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, Statement.NO_GENERATED_KEYS);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, int autoGeneratedKeys) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, Statement.NO_GENERATED_KEYS);
} catch (RuntimeException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, int autoGeneratedKeys) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, Statement.NO_GENERATED_KEYS);
} catch (Error ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, int[] columnIndexes) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, new int[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, int[] columnIndexes) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, new int[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, int[] columnIndexes) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, new int[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, String[] columnNames) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, new String[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, String[] columnNames) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, new String[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public int statement_executeUpdate(StatementProxy statement, String sql, String[] columnNames) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.statement_executeUpdate(chain, statement, sql, new String[0]);
} catch (Throwable ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// ///////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public ResultSetProxy statement_getGeneratedKeys(StatementProxy statement) throws SQLException {
return null;
}
};
filter.statement_getGeneratedKeys(chain, statement);
}
{
final ResultSetProxy resultSet = new ResultSetProxyImpl(statement, null, 2001, null);
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public ResultSetProxy statement_getGeneratedKeys(StatementProxy statement) throws SQLException {
return resultSet;
}
};
filter.statement_getGeneratedKeys(chain, statement);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean preparedStatement_execute(PreparedStatementProxy statement) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.preparedStatement_execute(chain, statement);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean preparedStatement_execute(PreparedStatementProxy statement) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.preparedStatement_execute(chain, statement);
} catch (RuntimeException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public boolean preparedStatement_execute(PreparedStatementProxy statement) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.preparedStatement_execute(chain, statement);
} catch (Error ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public ResultSetProxy preparedStatement_executeQuery(PreparedStatementProxy statement) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.preparedStatement_executeQuery(chain, statement);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public ResultSetProxy preparedStatement_executeQuery(PreparedStatementProxy statement) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.preparedStatement_executeQuery(chain, statement);
} catch (RuntimeException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public ResultSetProxy preparedStatement_executeQuery(PreparedStatementProxy statement) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.preparedStatement_executeQuery(chain, statement);
} catch (Error ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public void dataSource_recycle(DruidPooledConnection connection) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.dataSource_releaseConnection(chain, null);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public void dataSource_recycle(DruidPooledConnection connection) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.dataSource_releaseConnection(chain, null);
} catch (RuntimeException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public void dataSource_recycle(DruidPooledConnection connection) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.dataSource_releaseConnection(chain, null);
} catch (Error ex) {
error = ex;
}
Assert.assertNotNull(error);
}
// //////////////////////////
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public DruidPooledConnection dataSource_connect(DruidDataSource dataSource, long maxWaitMillis) throws SQLException {
throw new SQLException();
}
};
Throwable error = null;
try {
filter.dataSource_getConnection(chain, null, 0L);
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public DruidPooledConnection dataSource_connect(DruidDataSource dataSource, long maxWaitMillis) throws SQLException {
throw new RuntimeException();
}
};
Throwable error = null;
try {
filter.dataSource_getConnection(chain, null, 0L);
} catch (RuntimeException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
{
FilterChain chain = new FilterChainImpl(new DataSourceProxyImpl(null, config)) {
public DruidPooledConnection dataSource_connect(DruidDataSource dataSource, long maxWaitMillis) throws SQLException {
throw new Error();
}
};
Throwable error = null;
try {
filter.dataSource_getConnection(chain, null, 0L);
} catch (Error ex) {
error = ex;
}
Assert.assertNotNull(error);
}
}
Aggregations