use of org.adbcj.DbException in project adbcj by mheath.
the class SelectTest method testBrokenSelect.
public void testBrokenSelect() throws Exception {
Connection connection = connectionManager.connect().get();
DbSessionFuture<ResultSet> future = connection.executeQuery("SELECT broken_query");
try {
future.get(5, TimeUnit.SECONDS);
throw new AssertionError("Issues a bad query, future should have failed");
} catch (DbException e) {
// Pass
} finally {
connection.close(true).get();
}
}
Aggregations