conn.close();
}
public void test_rollback() throws Exception {
DruidPooledConnection conn = dataSource.getConnection().unwrap(DruidPooledConnection.class);
conn.setAutoCommit(false);
Statement stmt = conn.createStatement();
stmt.execute("SELECT 1");
conn.getConnection().close();
{
SQLException error = null;
try {
conn.rollback();
} catch (SQLException ex) {
error = ex;
}
Assert.assertNotNull(error);
}
conn.close();
}