From e7871daca4810456aad393860bf54989ff3bbd3b Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Wed, 14 Feb 2024 22:32:39 -0500 Subject: [PATCH] DBZ-7491 Always clean-up after each Db2ReselectColumnsProcessorIT test --- .../db2/Db2ReselectColumnsProcessorIT.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) 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(); + } } }