use of com.alibaba.druid.pool.DruidPooledResultSet in project druid by alibaba.
the class ResultSetTest2 method test_closeError.
public void test_closeError() throws Exception {
MockResultSet mock = new MockResultSet(null) {
public void close() throws SQLException {
throw new SQLException();
}
};
DruidPooledResultSet rs = new DruidPooledResultSet(stmt, mock);
SQLException error = null;
try {
rs.close();
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
use of com.alibaba.druid.pool.DruidPooledResultSet in project druid by alibaba.
the class ResultSetTest2 method setUp.
protected void setUp() throws Exception {
stmt = new DruidPooledStatement(null, null) {
protected SQLException checkException(Throwable error) throws SQLException {
if (error instanceof SQLException) {
return (SQLException) error;
}
return new SQLException(error);
}
};
raw = new MockResultSet(null);
raw.getRows().add(new Object[] { null });
resultSet = new DruidPooledResultSet(stmt, raw);
}
Aggregations