Skip to content

Commit

Permalink
DBZ-7491 Always clean-up after each Db2ReselectColumnsProcessorIT test
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Feb 15, 2024
1 parent 8db316b commit e7871da
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}

Expand Down

0 comments on commit e7871da

Please sign in to comment.