Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBZ-7516 Fix reselect test failure, use enable table CDC callback #140

Merged
merged 3 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@

<!-- Flaky Test Support -->
<fail.flaky.tests>true</fail.flaky.tests>

<!-- Order in which Maven Failsafe plugin runs integration tests, the default is in alphabetical order -->
<runOrder>alphabetical</runOrder>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,19 @@ public void afterEach() throws Exception {
}
finally {
if (connection != null) {
TestHelper.disableDbCdc(connection);
TestHelper.disableTableCdc(connection, "DBZ4321");
connection.execute("DROP TABLE dbz4321");
try {
TestHelper.disableDbCdc(connection);
}
catch (Exception e) {
e.printStackTrace();
}
try {
TestHelper.disableTableCdc(connection, "DBZ4321");
}
catch (Exception e) {
e.printStackTrace();
}
connection.execute("DROP TABLE dbz4321 IF EXISTS");
connection.execute("DELETE FROM ASNCDC.IBMSNAP_REGISTER");
connection.execute("DELETE FROM ASNCDC.IBMQREP_COLVERSION");
connection.execute("DELETE FROM ASNCDC.IBMQREP_TABVERSION");
Expand Down Expand Up @@ -89,9 +99,6 @@ protected void createTable() throws Exception {
connection.execute("DROP TABLE DBZ4321 IF EXISTS");
TestHelper.enableDbCdc(connection);
connection.execute("CREATE TABLE DBZ4321 (id int not null, data varchar(50), data2 int, primary key(id))");
connection.execute("UPDATE ASNCDC.IBMSNAP_REGISTER SET STATE = 'A' WHERE SOURCE_OWNER = 'DB2INST1'");
TestHelper.refreshAndWait(connection);
TestHelper.enableTableCdc(connection, "DBZ4321");
}

@Override
Expand All @@ -118,4 +125,10 @@ protected String fieldName(String fieldName) {
return fieldName.toUpperCase();
}

@Override
protected void enableTableForCdc() throws Exception {
connection.execute("UPDATE ASNCDC.IBMSNAP_REGISTER SET STATE = 'A' WHERE SOURCE_OWNER = 'DB2INST1'");
TestHelper.refreshAndWait(connection);
TestHelper.enableTableCdc(connection, "DBZ4321");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,11 @@ public void snapshotWithAdditionalConditionWithRestart() throws Exception {
super.snapshotWithAdditionalConditionWithRestart();
}

@Test
@Override
@Flaky("DBZ-7478")
public void snapshotWithAdditionalCondition() throws Exception {
super.snapshotWithAdditionalCondition();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@
/**
* Default value handling integration tests using online schema evolution processes.
*
* NOTE:
* Class intentionally named with "ZZZ" prefix to run last.
*
* @author Chris Cranford
*/
public class Db2OnlineDefaultValueIT extends AbstractDb2DefaultValueIT {
public class ZZZDb2OnlineDefaultValueIT extends AbstractDb2DefaultValueIT {

@Rule
public TestRule conditionalFail = new ConditionalFail();
Expand Down