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

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


The following commit(s) were added to refs/heads/dev by this push:
     new b29ef8a513 [Improve][Connecotr-v2][Databend] Optimize CI judgment 
logic (#10130)
b29ef8a513 is described below

commit b29ef8a513a24e9178fae66c83657af4111c52c2
Author: Jast <[email protected]>
AuthorDate: Wed Dec 10 14:04:48 2025 +0800

    [Improve][Connecotr-v2][Databend] Optimize CI judgment logic (#10130)
---
 .../e2e/connector/databend/DatabendCDCSinkIT.java  | 40 +++++++++++-----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git 
a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-databend-e2e/src/test/java/org/apache/seatunnel/e2e/connector/databend/DatabendCDCSinkIT.java
 
b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-databend-e2e/src/test/java/org/apache/seatunnel/e2e/connector/databend/DatabendCDCSinkIT.java
index 5efb815f87..d8a55c67c8 100644
--- 
a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-databend-e2e/src/test/java/org/apache/seatunnel/e2e/connector/databend/DatabendCDCSinkIT.java
+++ 
b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-databend-e2e/src/test/java/org/apache/seatunnel/e2e/connector/databend/DatabendCDCSinkIT.java
@@ -75,9 +75,26 @@ public class DatabendCDCSinkIT extends TestSuiteBase 
implements TestResource {
                 container.executeJob("/databend/fake_to_databend_cdc.conf");
         Assertions.assertEquals(0, execResult.getExitCode(), 
execResult.getStderr());
 
-        // Wait for the merge operation to complete
-        // Increased wait time to ensure merge operations finish
-        Thread.sleep(10000);
+        Awaitility.await()
+                .atMost(120, TimeUnit.SECONDS)
+                .pollInterval(1, TimeUnit.SECONDS)
+                .ignoreExceptions()
+                .untilAsserted(
+                        () -> {
+                            try (Statement stmt = connection.createStatement();
+                                    ResultSet rs =
+                                            stmt.executeQuery(
+                                                    "SELECT COUNT(*) as count 
FROM sink_table")) {
+                                if (rs.next()) {
+                                    int count = rs.getInt("count");
+                                    LOG.info(
+                                            "Current record count in 
sink_table: {}, expecting 3",
+                                            count);
+                                    Assertions.assertEquals(
+                                            3, count, "Expected 3 records in 
sink_table");
+                                }
+                            }
+                        });
 
         // Verify the sink results
         try (Statement statement = connection.createStatement()) {
@@ -270,23 +287,6 @@ public class DatabendCDCSinkIT extends TestSuiteBase 
implements TestResource {
         }
     }
 
-    //    private synchronized Connection getConnection() throws SQLException {
-    //        if (this.connection == null || this.connection.isClosed()) {
-    //            LOG.info("Creating new database connection");
-    //            final Properties info = new Properties();
-    //            info.put("user", "root");
-    //            info.put("password", "");
-    //
-    //            String jdbcUrl =
-    //                    String.format(
-    //                            "jdbc:databend://%s:%d/%s?ssl=false",
-    //                            container.getHost(), 
container.getMappedPort(8000), DATABASE);
-    //
-    //            this.connection = DriverManager.getConnection(jdbcUrl, info);
-    //        }
-    //        return this.connection;
-    //    }
-
     private void initConnection()
             throws SQLException, ClassNotFoundException, 
InstantiationException,
                     IllegalAccessException {

Reply via email to