This is an automated email from the ASF dual-hosted git repository.
zhangshenghang 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 577032fb5a [Test][E2E] Give PostgresCDCIT post-restore assertions
their own budget (#11644)
577032fb5a is described below
commit 577032fb5a73581eb6fdce25479c17620e35043f
Author: David Zollo <[email protected]>
AuthorDate: Sun Aug 23 09:48:18 2026 +0800
[Test][E2E] Give PostgresCDCIT post-restore assertions their own budget
(#11644)
Co-authored-by: danielnadean
<[email protected]>
Co-authored-by: DanielLeens <[email protected]>
---
.../seatunnel/cdc/postgres/PostgresCDCIT.java | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git
a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-postgres-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/PostgresCDCIT.java
b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-postgres-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/PostgresCDCIT.java
index 2f903ea3c0..f2cb2375d3 100644
---
a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-postgres-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/PostgresCDCIT.java
+++
b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-cdc-postgres-e2e/src/test/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/PostgresCDCIT.java
@@ -135,6 +135,17 @@ public class PostgresCDCIT extends TestSuiteBase
implements TestResource {
*/
private static final long DEBEZIUM_JSON_RECORD_WAIT_TIMEOUT_SECONDS = 180L;
+ /**
+ * Budget for assertions made immediately after a savepoint restore.
+ *
+ * <p>The plain 60s used elsewhere in this class only has to cover a CDC
round trip on an
+ * already-running job. A post-restore assertion additionally has to
absorb the restore itself -
+ * cluster restart, connector re-initialization and replication slot
reattach - before the round
+ * trip it asserts on can even begin. On a loaded runner the restore alone
can consume the whole
+ * 60s, so these waits get their own budget rather than sharing the
round-trip one.
+ */
+ private static final long RESTORE_ASSERT_TIMEOUT_MILLIS = 180000L;
+
// kafka container
private static final String KAFKA_IMAGE_NAME =
"confluentinc/cp-kafka:7.0.9";
@@ -599,7 +610,7 @@ public class PostgresCDCIT extends TestSuiteBase implements
TestResource {
CompletableFuture<Void> restoredCommittedOffsetJob =
committedOffsetJob;
// Restoring the checkpoint and reconnecting the existing
replication slot can take
// longer on shared GitHub runners than the initial CDC startup.
- await().atMost(120, TimeUnit.SECONDS)
+ await().atMost(RESTORE_ASSERT_TIMEOUT_MILLIS,
TimeUnit.MILLISECONDS)
.untilAsserted(
() -> {
assertJobHasNoAsyncFailure(restoredCommittedOffsetJob);
@@ -895,7 +906,7 @@ public class PostgresCDCIT extends TestSuiteBase implements
TestResource {
upsertDeleteSourceTable(POSTGRESQL_SCHEMA, SOURCE_TABLE_2);
// stream stage
- await().atMost(60000, TimeUnit.MILLISECONDS)
+ await().atMost(RESTORE_ASSERT_TIMEOUT_MILLIS,
TimeUnit.MILLISECONDS)
.untilAsserted(
() ->
Assertions.assertAll(
@@ -997,7 +1008,7 @@ public class PostgresCDCIT extends TestSuiteBase
implements TestResource {
});
// stream stage
- await().atMost(60000, TimeUnit.MILLISECONDS)
+ await().atMost(RESTORE_ASSERT_TIMEOUT_MILLIS,
TimeUnit.MILLISECONDS)
.untilAsserted(
() ->
Assertions.assertAll(