You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by li...@apache.org on 2026/09/06 04:49:39 UTC
(seatunnel) branch stabilize-doris-e2e-startup-and-visibility created (now 6773d141f6)
This is an automated email from the ASF dual-hosted git repository.
davidzollo pushed a change to branch stabilize-doris-e2e-startup-and-visibility
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
at 6773d141f6 [Test][E2E] Give the Doris e2e container a startup budget and wait for 2pc sink visibility
This branch includes the following new commits:
new 6773d141f6 [Test][E2E] Give the Doris e2e container a startup budget and wait for 2pc sink visibility
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(seatunnel) 01/01: [Test][E2E] Give the Doris e2e container a startup budget and wait for 2pc sink visibility
Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davidzollo pushed a commit to branch stabilize-doris-e2e-startup-and-visibility
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
commit 6773d141f6a4967e1b33ec2837d8b16691f33f4e
Author: David Zollo <da...@gmail.com>
AuthorDate: Sun Sep 6 00:49:30 2026 -0400
[Test][E2E] Give the Doris e2e container a startup budget and wait for 2pc sink visibility
Two Doris e2e flakes that keep hitting unrelated PRs:
1. AbstractDorisIT started apache/doris:doris-all-in-one-2.1.0 with the
60s default of the port wait strategy. The all-in-one image only opens
the exposed ports once FE is up, which on loaded runners takes longer
than that ("Timed out waiting for container port to open (localhost
ports: [...] should be listening)" after ~61s, seen on fork runs
33971836407 and 34002072283), while the JDBC readiness loop that
follows would still have had five minutes. Give the port wait the same
budget as that loop.
2. DorisIT#assertHasData and the row count in testCustomSql read the sink
table once, right after executeJob returned. The sink jobs run with
sink.enable-2pc = true, so rows become visible only after Doris has
published the committed transaction; on the Spark legs that publish
lagged the job exit (empty sink table in testDoris and
testDorisDirectToBe, 1 of 101 rows in testCustomSql; fork runs
33994609465, 34004664286, 34002072283). Wait for visibility with
Awaitility (60s, 1s poll) instead of reading once. The assertions
themselves are unchanged.
---
.../e2e/connector/doris/AbstractDorisIT.java | 9 +++++-
.../seatunnel/e2e/connector/doris/DorisIT.java | 35 +++++++++++++++++-----
2 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/AbstractDorisIT.java b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/AbstractDorisIT.java
index e505b792c2..c5fe1c0b50 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/AbstractDorisIT.java
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/AbstractDorisIT.java
@@ -79,7 +79,14 @@ public abstract class AbstractDorisIT extends TestSuiteBase implements TestResou
.withNetwork(NETWORK)
.withNetworkAliases(HOST)
.withExposedPorts(QUERY_PORT, HTTP_PORT, BE_HTTP_PORT)
- .withPrivilegedMode(true);
+ .withPrivilegedMode(true)
+ // The all-in-one image starts FE and BE from one entrypoint and only
+ // opens the three exposed ports once FE is up. On loaded CI runners
+ // that takes longer than the 60s default of the port wait strategy
+ // (seen as "Timed out waiting for container port to open" while the
+ // JDBC readiness loop below would still have had five minutes left),
+ // so give the port wait the same budget as the readiness loop.
+ .withStartupTimeout(Duration.ofMinutes(6));
Startables.deepStart(Stream.of(container)).join();
log.info("doris container started");
given().pollDelay(20, TimeUnit.SECONDS)
diff --git a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/DorisIT.java b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/DorisIT.java
index 109df2b12c..222718936f 100644
--- a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/DorisIT.java
+++ b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-doris-e2e/src/test/java/org/apache/seatunnel/e2e/connector/doris/DorisIT.java
@@ -26,6 +26,7 @@ import org.apache.seatunnel.e2e.common.container.TestContainer;
import org.apache.seatunnel.e2e.common.junit.TestContainerExtension;
import org.apache.seatunnel.e2e.common.util.DependencyJar;
+import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.TestTemplate;
@@ -54,6 +55,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
+import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@@ -171,7 +173,13 @@ public class DorisIT extends AbstractDorisIT {
Container.ExecResult execResult =
container.executeJob("/doris_source_and_sink_with_custom_sql.conf");
Assertions.assertEquals(0, execResult.getExitCode());
- Assertions.assertEquals(101, tableCount(sinkDB, UNIQUE_TABLE));
+ // Same 2pc publish lag as in assertHasData: the count is only complete once Doris has
+ // published the committed transaction (seen as 1 of 101 rows right after the job exit).
+ Awaitility.await()
+ .atMost(60, TimeUnit.SECONDS)
+ .pollInterval(1, TimeUnit.SECONDS)
+ .untilAsserted(
+ () -> Assertions.assertEquals(101, tableCount(sinkDB, UNIQUE_TABLE)));
clearUniqueTable();
}
@@ -383,13 +391,24 @@ public class DorisIT extends AbstractDorisIT {
}
private void assertHasData(String db, String table) {
- try (Statement statement = conn.createStatement()) {
- String sql = String.format("select * from %s.%s limit 1", db, table);
- ResultSet source = statement.executeQuery(sql);
- Assertions.assertTrue(source.next());
- } catch (Exception e) {
- throw new RuntimeException("test doris server image error", e);
- }
+ // The sink jobs run with sink.enable-2pc = true, so the rows only become visible once
+ // Doris has published the committed transaction. That publish step can lag the job's
+ // exit on loaded CI runners (seen on the Spark legs as an empty sink table right after
+ // executeJob returned), so wait for visibility instead of reading once.
+ Awaitility.await()
+ .atMost(60, TimeUnit.SECONDS)
+ .pollInterval(1, TimeUnit.SECONDS)
+ .untilAsserted(
+ () -> {
+ try (Statement statement = conn.createStatement()) {
+ String sql =
+ String.format("select * from %s.%s limit 1", db, table);
+ ResultSet source = statement.executeQuery(sql);
+ Assertions.assertTrue(source.next());
+ } catch (SQLException e) {
+ throw new RuntimeException("test doris server image error", e);
+ }
+ });
}
private void clearUniqueTable() {