From c5ea1bfd58c8705125697a401c2ee49a11cb700f Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Mon, 19 Feb 2024 12:20:19 -0500 Subject: [PATCH 1/3] [ci] Run Db2OnlineDefaultValueIT last (renamed with ZZZ prefix) --- pom.xml | 3 +++ ...neDefaultValueIT.java => ZZZDb2OnlineDefaultValueIT.java} | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) rename src/test/java/io/debezium/connector/db2/{Db2OnlineDefaultValueIT.java => ZZZDb2OnlineDefaultValueIT.java} (91%) diff --git a/pom.xml b/pom.xml index d68d215..42a7982 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,9 @@ true + + + alphabetical diff --git a/src/test/java/io/debezium/connector/db2/Db2OnlineDefaultValueIT.java b/src/test/java/io/debezium/connector/db2/ZZZDb2OnlineDefaultValueIT.java similarity index 91% rename from src/test/java/io/debezium/connector/db2/Db2OnlineDefaultValueIT.java rename to src/test/java/io/debezium/connector/db2/ZZZDb2OnlineDefaultValueIT.java index 8850a7f..1f21423 100644 --- a/src/test/java/io/debezium/connector/db2/Db2OnlineDefaultValueIT.java +++ b/src/test/java/io/debezium/connector/db2/ZZZDb2OnlineDefaultValueIT.java @@ -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(); From e512bf082840d5f9d5f83634c546c3e9a67066c7 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Mon, 19 Feb 2024 19:54:07 -0500 Subject: [PATCH 2/3] DBZ-7516 Fix Reselect test failure, use enable table CDC callback --- .../db2/Db2ReselectColumnsProcessorIT.java | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/test/java/io/debezium/connector/db2/Db2ReselectColumnsProcessorIT.java b/src/test/java/io/debezium/connector/db2/Db2ReselectColumnsProcessorIT.java index 5fbb378..27faa04 100644 --- a/src/test/java/io/debezium/connector/db2/Db2ReselectColumnsProcessorIT.java +++ b/src/test/java/io/debezium/connector/db2/Db2ReselectColumnsProcessorIT.java @@ -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"); @@ -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 @@ -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"); + } } From 92f778c739f91c8e0442f6f45e1835f140f7b632 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Mon, 19 Feb 2024 21:09:57 -0500 Subject: [PATCH 3/3] [ci] Mark snapshotWithAdditionalCondition as Flaky --- .../io/debezium/connector/db2/IncrementalSnapshotIT.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/io/debezium/connector/db2/IncrementalSnapshotIT.java b/src/test/java/io/debezium/connector/db2/IncrementalSnapshotIT.java index b5d24e2..a138e73 100644 --- a/src/test/java/io/debezium/connector/db2/IncrementalSnapshotIT.java +++ b/src/test/java/io/debezium/connector/db2/IncrementalSnapshotIT.java @@ -194,4 +194,11 @@ public void snapshotWithAdditionalConditionWithRestart() throws Exception { super.snapshotWithAdditionalConditionWithRestart(); } + @Test + @Override + @Flaky("DBZ-7478") + public void snapshotWithAdditionalCondition() throws Exception { + super.snapshotWithAdditionalCondition(); + } + }