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

tyrantlucifer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 714511a5d [Hotfix][E2E][Clickhouse] Fix the bug of clickhouse e2e case 
(#3985)
714511a5d is described below

commit 714511a5dd08ee5af2a92f6a7fa6b31f1eaa4f60
Author: Tyrantlucifer <[email protected]>
AuthorDate: Fri Jan 20 22:10:25 2023 +0800

    [Hotfix][E2E][Clickhouse] Fix the bug of clickhouse e2e case (#3985)
    
    * [Feature][Core][Flink] Improve stability of clickhouse e2e
    
    * [Hotfix][E2E][Clickhouse] Add delete table logic before test cases
    
    * [Hotfix][E2E][Clickhouse] Revert
    
    * [Hotfix][E2E][Clickhouse] Improve stability of ck e2e
    
    * [Hotfix][E2E][Clickhouse] Fix error params
---
 .../clickhouse/ClickhouseSinkCDCChangelogIT.java          | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git 
a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-clickhouse-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/ClickhouseSinkCDCChangelogIT.java
 
b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-clickhouse-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/ClickhouseSinkCDCChangelogIT.java
index 6f233524c..56a135a05 100644
--- 
a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-clickhouse-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/ClickhouseSinkCDCChangelogIT.java
+++ 
b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-clickhouse-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/ClickhouseSinkCDCChangelogIT.java
@@ -103,7 +103,13 @@ public class ClickhouseSinkCDCChangelogIT extends 
TestSuiteBase implements TestR
         Container.ExecResult execResult = 
container.executeJob("/clickhouse_sink_cdc_changelog_case2.conf");
         Assertions.assertEquals(0, execResult.getExitCode());
 
-        checkSinkTableRows();
+        Awaitility
+                .given()
+                .ignoreExceptions()
+                .await()
+                .atLeast(100L, TimeUnit.MILLISECONDS)
+                .atMost(20L, TimeUnit.SECONDS)
+                .untilAsserted(this::checkSinkTableRows);
         dropSinkTable();
     }
 
@@ -180,12 +186,15 @@ public class ClickhouseSinkCDCChangelogIT extends 
TestSuiteBase implements TestR
                 Arrays.asList(1L, "A_1", 100),
                 Arrays.asList(3L, "C", 100))
             .collect(Collectors.toSet());
-        Assertions.assertIterableEquals(expected, actual);
+        if (!Arrays.equals(actual.toArray(), expected.toArray())) {
+            throw new IllegalStateException(String.format("Actual results %s 
not equal expected results %s",
+                    Arrays.toString(actual.toArray()), 
Arrays.toString(expected.toArray())));
+        }
     }
 
     private void dropSinkTable() {
         try (Statement statement = connection.createStatement()) {
-            statement.execute(String.format("drop table %s.%s", DATABASE, 
SINK_TABLE));
+            statement.execute(String.format("drop table if exists %s.%s sync", 
DATABASE, SINK_TABLE));
         } catch (SQLException e) {
             throw new RuntimeException("Test clickhouse server image error", 
e);
         }

Reply via email to