You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by le...@apache.org on 2025/04/10 01:21:50 UTC

(flink-cdc) branch master updated: [hotfix][test] Sleep to wait for the assign status to INITIAL_ASSIGNING_FINISHED so that newly added table won't be stuck

This is an automated email from the ASF dual-hosted git repository.

leonard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-cdc.git


The following commit(s) were added to refs/heads/master by this push:
     new ec1e0abad [hotfix][test] Sleep to wait for the assign status to INITIAL_ASSIGNING_FINISHED so that newly added table won't be stuck
ec1e0abad is described below

commit ec1e0abadce74a9a1f0e98fded926a9be3c4af91
Author: Hongshun Wang <12...@users.noreply.github.com>
AuthorDate: Thu Apr 10 09:21:46 2025 +0800

    [hotfix][test] Sleep to wait for the assign status to INITIAL_ASSIGNING_FINISHED so that newly added table won't be stuck
    
    This closes #3978
---
 .../source/MysqlPipelineNewlyAddedTableITCase.java |   3 +
 .../mongodb/source/NewlyAddedTableITCase.java      |   6 +-
 .../mysql/source/NewlyAddedTableITCase.java        |   5 +
 .../mysql/table/MySqlConnectorITCase.java          | 145 +++++++++------------
 .../oracle/source/NewlyAddedTableITCase.java       |   4 +-
 .../postgres/source/NewlyAddedTableITCase.java     |   4 +
 .../sqlserver/source/SqlServerSourceITCase.java    |   3 +
 7 files changed, 82 insertions(+), 88 deletions(-)

diff --git a/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/test/java/org/apache/flink/cdc/connectors/mysql/source/MysqlPipelineNewlyAddedTableITCase.java b/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/test/java/org/apache/flink/cdc/connectors/mysql/source/MysqlPipelineNewlyAddedTableITCase.java
index 98a04f142..03202d385 100644
--- a/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/test/java/org/apache/flink/cdc/connectors/mysql/source/MysqlPipelineNewlyAddedTableITCase.java
+++ b/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/test/java/org/apache/flink/cdc/connectors/mysql/source/MysqlPipelineNewlyAddedTableITCase.java
@@ -351,6 +351,9 @@ class MysqlPipelineNewlyAddedTableITCase extends MySqlSourceTestBase {
             initialAddressTables(getConnection(), testParam.getSecondRoundInitTables());
         }
 
+        // sleep 1s to wait for the assign status to INITIAL_ASSIGNING_FINISHED.
+        // Otherwise, the restart job won't read newly added tables, and this test will be stuck.
+        Thread.sleep(1000L);
         // step 4: trigger a savepoint and cancel the job
         finishedSavePointPath = triggerSavepointWithRetry(jobClient, savepointDirectory);
         jobClient.cancel().get();
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/source/NewlyAddedTableITCase.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/source/NewlyAddedTableITCase.java
index afb615965..606bc9911 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/source/NewlyAddedTableITCase.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mongodb-cdc/src/test/java/org/apache/flink/cdc/connectors/mongodb/source/NewlyAddedTableITCase.java
@@ -578,6 +578,10 @@ class NewlyAddedTableITCase extends MongoDBSourceTestBase {
             MongoDBTestUtils.waitForSinkSize("sink", fetchedDataList.size());
             MongoDBAssertUtils.assertEqualsInAnyOrder(
                     fetchedDataList, TestValuesTableFactory.getRawResultsAsStrings("sink"));
+            // sleep 1s to wait for the assign status to INITIAL_ASSIGNING_FINISHED.
+            // Otherwise, the restart job won't read newly added tables, and this test will be
+            // stuck.
+            Thread.sleep(1000L);
             finishedSavePointPath = triggerSavepointWithRetry(jobClient, savepointDirectory);
             jobClient.cancel().get();
         }
@@ -824,7 +828,7 @@ class NewlyAddedTableITCase extends MongoDBSourceTestBase {
             waitForUpsertSinkSize("sink", fetchedDataList.size());
             // the result size of sink may arrive fetchedDataList.size() with old data, wait one
             // checkpoint to wait retract old record and send new record
-            Thread.sleep(1000);
+            Thread.sleep(1000L);
             MongoDBAssertUtils.assertEqualsInAnyOrder(
                     fetchedDataList, TestValuesTableFactory.getResultsAsStrings("sink"));
 
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/source/NewlyAddedTableITCase.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/source/NewlyAddedTableITCase.java
index 7b44473b6..9495234bb 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/source/NewlyAddedTableITCase.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/source/NewlyAddedTableITCase.java
@@ -636,6 +636,11 @@ class NewlyAddedTableITCase extends MySqlSourceTestBase {
             waitForSinkSize("sink", fetchedDataList.size());
             assertEqualsInAnyOrder(
                     fetchedDataList, TestValuesTableFactory.getRawResultsAsStrings("sink"));
+
+            // sleep 1s to wait for the assign status to INITIAL_ASSIGNING_FINISHED.
+            // Otherwise, the restart job won't read newly added tables, and this test will be
+            // stuck.
+            Thread.sleep(1000L);
             finishedSavePointPath = triggerSavepointWithRetry(jobClient, savepointDirectory);
             jobClient.cancel().get();
         }
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/table/MySqlConnectorITCase.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/table/MySqlConnectorITCase.java
index 62031a0dc..34cd5803a 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/table/MySqlConnectorITCase.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/test/java/org/apache/flink/cdc/connectors/mysql/table/MySqlConnectorITCase.java
@@ -41,9 +41,9 @@ import org.apache.flink.util.CloseableIterator;
 import org.apache.flink.shaded.guava31.com.google.common.collect.Lists;
 
 import org.assertj.core.api.Assertions;
-import org.assertj.core.api.Assumptions;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
@@ -65,7 +65,7 @@ import java.util.stream.Stream;
 import static org.apache.flink.api.common.JobStatus.RUNNING;
 import static org.apache.flink.cdc.connectors.mysql.LegacyMySqlSourceTest.currentMySqlLatestOffset;
 import static org.apache.flink.cdc.connectors.mysql.MySqlTestUtils.waitForJobStatus;
-import static org.assertj.core.api.Assumptions.assumeThat;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /** Integration tests for MySQL Table source. */
 class MySqlConnectorITCase extends MySqlSourceTestBase {
@@ -330,8 +330,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
 
         // async submit job
         TableResult result = tEnv.executeSql("INSERT INTO sink SELECT * FROM debezium_source");
-        // wait until the snapshot phase finished
-        waitForSinkSize("sink", 11);
+        // wait until the snapshot phase finished so that binlog will be read later in binlog phase.
+        waitForSinkSize("sink", 12);
 
         try (Connection connection = inventoryDatabase.getJdbcConnection();
                 Statement statement = connection.createStatement()) {
@@ -405,12 +405,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         result.getJobClient().get().cancel().get();
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testCheckpointIsOptionalUnderSingleParallelism(boolean incrementalSnapshot)
-            throws Exception {
-        setup(incrementalSnapshot);
-        assumeThat(incrementalSnapshot).isTrue();
+    @Test
+    void testCheckpointIsOptionalUnderSingleParallelism() throws Exception {
+        setup(true);
         env.setParallelism(1);
         // check the checkpoint is optional when parallelism is 1
         env.getCheckpointConfig().disableCheckpointing();
@@ -431,7 +428,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                                 + " 'password' = '%s',"
                                 + " 'database-name' = '%s',"
                                 + " 'table-name' = '%s',"
-                                + " 'scan.incremental.snapshot.enabled' = '%s',"
+                                + " 'scan.incremental.snapshot.enabled' = 'true',"
                                 + " 'server-id' = '%s',"
                                 + " 'server-time-zone' = 'UTC',"
                                 + " 'scan.incremental.snapshot.chunk.size' = '%s'"
@@ -442,9 +439,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         TEST_PASSWORD,
                         inventoryDatabase.getDatabaseName(),
                         "products",
-                        incrementalSnapshot,
-                        getServerId(incrementalSnapshot),
-                        getSplitSize(incrementalSnapshot));
+                        getServerId(true),
+                        getSplitSize(true));
         tEnv.executeSql(sourceDDL);
 
         // async submit job
@@ -831,12 +827,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         result.getJobClient().get().cancel().get();
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testBigTableWithHugeSplits(boolean incrementalSnapshot) throws Exception {
-        // only check when incremental snapshot is enabled
-        Assumptions.assumeThat(incrementalSnapshot).isTrue();
-        setup(incrementalSnapshot);
+    @Test
+    void testBigTableWithHugeSplits() throws Exception {
+        setup(true);
         final int tableRowNumber = 10;
         fullTypesMySql57Database.createAndInitialize();
         try (Connection connection = fullTypesMySql57Database.getJdbcConnection();
@@ -877,7 +870,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         fullTypesMySql57Database.getUsername(),
                         fullTypesMySql57Database.getPassword(),
                         fullTypesMySql57Database.getDatabaseName(),
-                        getServerId(incrementalSnapshot));
+                        getServerId(true));
         String sinkDDL =
                 "CREATE TABLE sink ("
                         + " `id` BIGINT NOT NULL,"
@@ -917,7 +910,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                 Lists.newArrayList("+U[0, 1024]", "+U[1, 1025]", "+U[2, 2048]", "+U[3, 2049]"));
 
         List<String> actual = TestValuesTableFactory.getRawResultsAsStrings("sink");
-        Assertions.assertThat(actual).containsExactlyInAnyOrderElementsOf(expected);
+        assertThat(actual).containsExactlyInAnyOrderElementsOf(expected);
         result.getJobClient().get().cancel().get();
     }
 
@@ -1021,7 +1014,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         //  keyby shuffle before "values" upsert sink. We should assert merged result once
         //  https://issues.apache.org/jira/browse/FLINK-24511 is fixed.
         List<String> actual = TestValuesTableFactory.getRawResultsAsStrings("sink");
-        Assertions.assertThat(actual).containsExactlyInAnyOrderElementsOf(expected);
+        assertThat(actual).containsExactlyInAnyOrderElementsOf(expected);
         result.getJobClient().get().cancel().get();
     }
 
@@ -1098,11 +1091,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         result.getJobClient().get().cancel().get();
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testPrimaryKeyWithVarbinaryType(boolean incrementalSnapshot) throws Exception {
-        Assumptions.assumeThat(incrementalSnapshot).isTrue();
-        setup(incrementalSnapshot);
+    @Test
+    void testPrimaryKeyWithVarbinaryType() throws Exception {
+        setup(true);
         inventoryDatabase.createAndInitialize();
         String sourceDDL =
                 String.format(
@@ -1131,8 +1122,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         TEST_PASSWORD,
                         inventoryDatabase.getDatabaseName(),
                         "varbinary_pk_table",
-                        getServerId(incrementalSnapshot),
-                        getSplitSize(incrementalSnapshot));
+                        getServerId(true),
+                        getSplitSize(true));
         tEnv.executeSql(sourceDDL);
 
         // async submit job
@@ -1245,11 +1236,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         result.getJobClient().get().cancel().get();
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testReadingWithDotTableName(boolean incrementalSnapshot) throws Exception {
-        Assumptions.assumeThat(incrementalSnapshot).isTrue();
-        setup(incrementalSnapshot);
+    @Test
+    void testReadingWithDotTableName() throws Exception {
+        setup(true);
         customer3_0Database.createAndInitialize();
         String sourceDDL =
                 String.format(
@@ -1267,7 +1256,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                                 + " 'password' = '%s',"
                                 + " 'database-name' = '%s',"
                                 + " 'table-name' = '%s',"
-                                + " 'scan.incremental.snapshot.enabled' = '%s',"
+                                + " 'scan.incremental.snapshot.enabled' = 'true',"
                                 + " 'server-time-zone' = 'UTC',"
                                 + " 'server-id' = '%s',"
                                 + " 'scan.incremental.snapshot.chunk.size' = '%s'"
@@ -1278,9 +1267,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         customer3_0Database.getPassword(),
                         customer3_0Database.getDatabaseName(),
                         "customers3.0",
-                        incrementalSnapshot,
-                        getServerId(incrementalSnapshot),
-                        getSplitSize(incrementalSnapshot));
+                        getServerId(true),
+                        getSplitSize(true));
         tEnv.executeSql(sourceDDL);
         // async submit job
         TableResult result =
@@ -1387,11 +1375,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         result.getJobClient().get().cancel().get();
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testDdlWithDefaultStringValue(boolean incrementalSnapshot) throws Exception {
-        Assumptions.assumeThat(incrementalSnapshot).isTrue();
-        setup(incrementalSnapshot);
+    @Test
+    void testDdlWithDefaultStringValue() throws Exception {
+        setup(true);
         env.setRestartStrategy(RestartStrategies.noRestart());
         customerDatabase.createAndInitialize();
         String sourceDDL =
@@ -1410,7 +1396,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                                 + " 'password' = '%s',"
                                 + " 'database-name' = '%s',"
                                 + " 'table-name' = '%s',"
-                                + " 'scan.incremental.snapshot.enabled' = '%s',"
+                                + " 'scan.incremental.snapshot.enabled' = 'true',"
                                 + " 'server-time-zone' = 'UTC',"
                                 + " 'server-id' = '%s',"
                                 + " 'scan.incremental.snapshot.chunk.size' = '%s'"
@@ -1421,9 +1407,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         customerDatabase.getPassword(),
                         customerDatabase.getDatabaseName(),
                         "default_value_test.*",
-                        incrementalSnapshot,
-                        getServerId(incrementalSnapshot),
-                        getSplitSize(incrementalSnapshot));
+                        getServerId(true),
+                        getSplitSize(true));
         tEnv.executeSql(sourceDDL);
         // async submit job
         TableResult result = tEnv.executeSql("SELECT * FROM default_value_test");
@@ -1525,11 +1510,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         jobClient.cancel().get();
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testAlterWithDefaultStringValue(boolean incrementalSnapshot) throws Exception {
-        Assumptions.assumeThat(incrementalSnapshot).isTrue();
-        setup(incrementalSnapshot);
+    @Test
+    void testAlterWithDefaultStringValue() throws Exception {
+        setup(true);
         env.setRestartStrategy(RestartStrategies.noRestart());
         customerDatabase.createAndInitialize();
         String sourceDDL =
@@ -1548,7 +1531,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                                 + " 'password' = '%s',"
                                 + " 'database-name' = '%s',"
                                 + " 'table-name' = '%s',"
-                                + " 'scan.incremental.snapshot.enabled' = '%s',"
+                                + " 'scan.incremental.snapshot.enabled' = 'true',"
                                 + " 'server-time-zone' = 'UTC',"
                                 + " 'server-id' = '%s',"
                                 + " 'scan.incremental.snapshot.chunk.size' = '%s'"
@@ -1559,9 +1542,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         customerDatabase.getPassword(),
                         customerDatabase.getDatabaseName(),
                         "default_value_test",
-                        incrementalSnapshot,
-                        getServerId(incrementalSnapshot),
-                        getSplitSize(incrementalSnapshot));
+                        getServerId(true),
+                        getSplitSize(true));
         tEnv.executeSql(sourceDDL);
         // async submit job
         TableResult result = tEnv.executeSql("SELECT * FROM default_value_test");
@@ -1682,13 +1664,11 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         result.getJobClient().get().cancel().get();
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testStartupFromSpecificGtidSet(boolean incrementalSnapshot) throws Exception {
+    @Test
+    void testStartupFromSpecificGtidSet() throws Exception {
         // Unfortunately the legacy MySQL source without incremental snapshot does not support
         // starting from GTID set
-        Assumptions.assumeThat(incrementalSnapshot).isTrue();
-        setup(incrementalSnapshot);
+        setup(true);
 
         inventoryDatabase.createAndInitialize();
 
@@ -1731,7 +1711,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                                 + " 'server-time-zone' = 'UTC',"
                                 + " 'scan.startup.mode' = 'specific-offset',"
                                 + " 'scan.startup.specific-offset.gtid-set' = '%s',"
-                                + " 'scan.incremental.snapshot.enabled' = '%s'"
+                                + " 'scan.incremental.snapshot.enabled' = 'true'"
                                 + ")",
                         MYSQL_CONTAINER.getHost(),
                         MYSQL_CONTAINER.getDatabasePort(),
@@ -1739,8 +1719,7 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         TEST_PASSWORD,
                         inventoryDatabase.getDatabaseName(),
                         "products",
-                        offset.getGtidSet(),
-                        incrementalSnapshot);
+                        offset.getGtidSet());
         String sinkDDL =
                 "CREATE TABLE sink "
                         + " WITH ("
@@ -2000,11 +1979,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         result.getJobClient().get().cancel().get();
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testReadingWithMultiMaxValue(boolean incrementalSnapshot) throws Exception {
-        setup(incrementalSnapshot);
-        assumeThat(incrementalSnapshot).isTrue();
+    @Test
+    void testReadingWithMultiMaxValue() throws Exception {
+        setup(true);
         inventoryDatabase.createAndInitialize();
         String sourceDDL =
                 String.format(
@@ -2031,8 +2008,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         TEST_PASSWORD,
                         inventoryDatabase.getDatabaseName(),
                         "multi_max_table",
-                        getServerId(incrementalSnapshot),
-                        getSplitSize(incrementalSnapshot));
+                        getServerId(true),
+                        getSplitSize(true));
         tEnv.executeSql(sourceDDL);
 
         // async submit job
@@ -2130,11 +2107,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                                 + "3. The server id has been used by other sync tools like canal, debezium and so on.\n");
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testBinlogTableMetadataDeserialization(boolean incrementalSnapshot) throws Exception {
-        setup(incrementalSnapshot);
-        assumeThat(incrementalSnapshot).isTrue();
+    @Test
+    void testBinlogTableMetadataDeserialization() throws Exception {
+        setup(true);
         binlogDatabase.createAndInitialize();
         String sourceDDL =
                 String.format(
@@ -2166,8 +2141,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         TEST_PASSWORD,
                         binlogDatabase.getDatabaseName(),
                         "binlog_metadata",
-                        getServerId(incrementalSnapshot),
-                        getSplitSize(incrementalSnapshot));
+                        getServerId(true),
+                        getSplitSize(true));
         tEnv.executeSql(sourceDDL);
 
         // async submit job
@@ -2281,11 +2256,9 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
         }
     }
 
-    @ParameterizedTest(name = "incrementalSnapshot = {0}")
-    @ValueSource(booleans = {true, false})
-    void testBinaryHandlingModeWithBase64(boolean incrementalSnapshot) throws Exception {
-        assumeThat(incrementalSnapshot).isTrue();
-        setup(incrementalSnapshot);
+    @Test
+    void testBinaryHandlingModeWithBase64() throws Exception {
+        setup(true);
         inventoryDatabase.createAndInitialize();
         String sourceDDL =
                 String.format(
@@ -2316,8 +2289,8 @@ class MySqlConnectorITCase extends MySqlSourceTestBase {
                         TEST_PASSWORD,
                         inventoryDatabase.getDatabaseName(),
                         "varbinary_base64_table",
-                        getServerId(incrementalSnapshot),
-                        getSplitSize(incrementalSnapshot));
+                        getServerId(true),
+                        getSplitSize(true));
         tEnv.executeSql(sourceDDL);
 
         // async submit job
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-oracle-cdc/src/test/java/org/apache/flink/cdc/connectors/oracle/source/NewlyAddedTableITCase.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-oracle-cdc/src/test/java/org/apache/flink/cdc/connectors/oracle/source/NewlyAddedTableITCase.java
index 16e274e37..3cf295501 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-oracle-cdc/src/test/java/org/apache/flink/cdc/connectors/oracle/source/NewlyAddedTableITCase.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-oracle-cdc/src/test/java/org/apache/flink/cdc/connectors/oracle/source/NewlyAddedTableITCase.java
@@ -492,7 +492,9 @@ class NewlyAddedTableITCase extends OracleSourceTestBase {
             waitForSinkSize("sink", fetchedDataList.size());
             assertEqualsInAnyOrder(
                     fetchedDataList, TestValuesTableFactory.getRawResultsAsStrings("sink"));
-            // wait task to stream phase
+            // sleep 10s to wait for the assign status to INITIAL_ASSIGNING_FINISHED.
+            // Otherwise, the restart job won't read newly added tables, and this test will be
+            // stuck.
             sleepMs(10000);
             finishedSavePointPath = triggerSavepointWithRetry(jobClient, savepointDirectory);
             jobClient.cancel().get();
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/NewlyAddedTableITCase.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/NewlyAddedTableITCase.java
index 7d47fe44b..e1f4298e1 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/NewlyAddedTableITCase.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/test/java/org/apache/flink/cdc/connectors/postgres/source/NewlyAddedTableITCase.java
@@ -525,6 +525,10 @@ class NewlyAddedTableITCase extends PostgresTestBase {
             waitForSinkSize("sink", fetchedDataList.size());
             assertEqualsInAnyOrder(
                     fetchedDataList, TestValuesTableFactory.getRawResultsAsStrings("sink"));
+            // sleep 1s to wait for the assign status to INITIAL_ASSIGNING_FINISHED.
+            // Otherwise, the restart job won't read newly added tables, and this test will be
+            // stuck.
+            Thread.sleep(1000L);
             finishedSavePointPath = triggerSavepointWithRetry(jobClient, savepointDirectory);
             jobClient.cancel().get();
         }
diff --git a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/test/java/org/apache/flink/cdc/connectors/sqlserver/source/SqlServerSourceITCase.java b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/test/java/org/apache/flink/cdc/connectors/sqlserver/source/SqlServerSourceITCase.java
index 923d17c57..e33e888d4 100644
--- a/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/test/java/org/apache/flink/cdc/connectors/sqlserver/source/SqlServerSourceITCase.java
+++ b/flink-cdc-connect/flink-cdc-source-connectors/flink-connector-sqlserver-cdc/src/test/java/org/apache/flink/cdc/connectors/sqlserver/source/SqlServerSourceITCase.java
@@ -38,6 +38,7 @@ import org.apache.flink.util.CloseableIterator;
 import io.debezium.jdbc.JdbcConnection;
 import org.apache.commons.lang3.StringUtils;
 import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Timeout;
 import org.slf4j.Logger;
@@ -124,6 +125,7 @@ class SqlServerSourceITCase extends SqlServerSourceTestBase {
     }
 
     @Test
+    @Disabled("Disable enable backfill test until FLINK-34833 is resolved")
     void testEnableBackfillWithDMLPreHighWaterMark() throws Exception {
 
         List<String> records = testBackfillWhenWritingEvents(false, 25, USE_PRE_HIGHWATERMARK_HOOK);
@@ -163,6 +165,7 @@ class SqlServerSourceITCase extends SqlServerSourceTestBase {
     }
 
     @Test
+    @Disabled("Disable enable backfill test until FLINK-34833 is resolved")
     void testEnableBackfillWithDMLPostLowWaterMark() throws Exception {
 
         List<String> records = testBackfillWhenWritingEvents(false, 25, USE_POST_LOWWATERMARK_HOOK);