diff --git a/src/test/java/io/debezium/connector/db2/Db2ReselectColumnsProcessorIT.java b/src/test/java/io/debezium/connector/db2/Db2ReselectColumnsProcessorIT.java index 65e100f..5fbb378 100644 --- a/src/test/java/io/debezium/connector/db2/Db2ReselectColumnsProcessorIT.java +++ b/src/test/java/io/debezium/connector/db2/Db2ReselectColumnsProcessorIT.java @@ -34,15 +34,19 @@ public void beforeEach() throws Exception { @After public void afterEach() throws Exception { - super.afterEach(); - if (connection != null) { - TestHelper.disableDbCdc(connection); - TestHelper.disableTableCdc(connection, "DBZ4321"); - connection.execute("DROP TABLE dbz4321"); - connection.execute("DELETE FROM ASNCDC.IBMSNAP_REGISTER"); - connection.execute("DELETE FROM ASNCDC.IBMQREP_COLVERSION"); - connection.execute("DELETE FROM ASNCDC.IBMQREP_TABVERSION"); - connection.close(); + try { + super.afterEach(); + } + finally { + if (connection != null) { + TestHelper.disableDbCdc(connection); + TestHelper.disableTableCdc(connection, "DBZ4321"); + connection.execute("DROP TABLE dbz4321"); + connection.execute("DELETE FROM ASNCDC.IBMSNAP_REGISTER"); + connection.execute("DELETE FROM ASNCDC.IBMQREP_COLVERSION"); + connection.execute("DELETE FROM ASNCDC.IBMQREP_TABVERSION"); + connection.close(); + } } }