protected void after(FrameworkMethod method) { if (!useTransaction(method)) { // make sure that the next test gets a clean database final DatabaseConfiguration databaseConfiguration = DATABASES.remove(jdbc); databaseConfiguration.getEntityManager().getProvider().dispose(); } entityManager = null; }
@Override public void dispose() { Connection conn = null; Statement stmt = null; try { conn = getConnection(); stmt = conn.createStatement(); stmt.executeUpdate("SHUTDOWN"); } catch (SQLException e) { // ignored } finally { closeQuietly(stmt); closeQuietly(conn); } super.dispose(); }
@Override public void dispose() { Connection conn = null; Statement stmt = null; try { conn = getConnection(); stmt = conn.createStatement(); stmt.executeUpdate("SHUTDOWN"); } catch (SQLException e) { // ignored } finally { closeQuietly(stmt); closeQuietly(conn); } super.dispose(); }