From 9aca98c7076b9dc6aa7818298b2259809a9f6c6e Mon Sep 17 00:00:00 2001 From: yuzelin <33053040+yuzelin@users.noreply.github.com> Date: Thu, 14 Dec 2023 14:40:39 +0800 Subject: [PATCH] [cdc] Fix unstable MySqlSyncDatabaseTableListITCase (#2508) --- .../action/cdc/mysql/MySqlSyncDatabaseTableListITCase.java | 2 -- .../src/test/resources/mysql/tablelist_test_setup.sql | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paimon-flink/paimon-flink-cdc/src/test/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncDatabaseTableListITCase.java b/paimon-flink/paimon-flink-cdc/src/test/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncDatabaseTableListITCase.java index 0af24a42fb0a..816b7b903afa 100644 --- a/paimon-flink/paimon-flink-cdc/src/test/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncDatabaseTableListITCase.java +++ b/paimon-flink/paimon-flink-cdc/src/test/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncDatabaseTableListITCase.java @@ -81,8 +81,6 @@ public void testActionRunResult() throws Exception { if (mode == COMBINED) { try (Statement statement = getStatement()) { // ensure the job steps into incremental phase - statement.executeUpdate("USE shard_1"); - statement.executeUpdate("INSERT INTO t2 VALUES (1, 'A')"); waitForResult( Collections.singletonList("+I[1, A]"), getFileStoreTable("shard_1_t2"), diff --git a/paimon-flink/paimon-flink-cdc/src/test/resources/mysql/tablelist_test_setup.sql b/paimon-flink/paimon-flink-cdc/src/test/resources/mysql/tablelist_test_setup.sql index ea49883dddea..d6af7682b189 100644 --- a/paimon-flink/paimon-flink-cdc/src/test/resources/mysql/tablelist_test_setup.sql +++ b/paimon-flink/paimon-flink-cdc/src/test/resources/mysql/tablelist_test_setup.sql @@ -47,6 +47,8 @@ CREATE TABLE s2 (k INT, name VARCHAR(100), PRIMARY KEY (k)); -- captured CREATE TABLE sa (k INT, name VARCHAR(100), PRIMARY KEY (k)); -- ignored CREATE TABLE m (k INT, name VARCHAR(100), PRIMARY KEY (k)); -- ignored +INSERT INTO t2 VALUES (1, 'A'); + USE shard_2; CREATE TABLE t1 (k INT, name VARCHAR(100), PRIMARY KEY (k)); -- captured