You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/10/19 12:21:26 UTC
(pulsar) branch branch-4.2 updated: [fix][test][branch-4.x] Wait for Oracle database creation to complete in PulsarDebeziumOracleSourceTest
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-4.2 by this push:
new 5e47b22f2ccf [fix][test][branch-4.x] Wait for Oracle database creation to complete in PulsarDebeziumOracleSourceTest
5e47b22f2ccf is described below
commit 5e47b22f2ccf3fd9d0cd3751df0eaf692dacc159
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Mon Oct 19 13:31:44 2026 +0300
[fix][test][branch-4.x] Wait for Oracle database creation to complete in PulsarDebeziumOracleSourceTest
The Oracle 12c container only waited for the listener port. dbca was still
creating the database when the test reconfigured it: the test saw status OPEN
mid-creation, ran "shutdown immediate", and dbca's post-configuration then
started the instance again. The test's "startup mount" failed with ORA-01081
and waitForOracleStatus("MOUNTED") spun until the 30 minute test timeout.
Wait for the entrypoint's "Database ready to use" log message instead, and set
the startup timeout on the wait strategy itself (withStartupTimeout on the
container was applied to the default strategy that waitingFor then replaced).
(cherry picked from commit 8d25fee4a89d712165ff22e0d8c6af582c4fca27)
---
.../tests/integration/containers/DebeziumOracleDbContainer.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/containers/DebeziumOracleDbContainer.java b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/containers/DebeziumOracleDbContainer.java
index d9196b2d3b6c..644f2a3589fd 100644
--- a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/containers/DebeziumOracleDbContainer.java
+++ b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/containers/DebeziumOracleDbContainer.java
@@ -20,7 +20,7 @@ package org.apache.pulsar.tests.integration.containers;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
-import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy;
+import org.testcontainers.containers.wait.strategy.Wait;
public class DebeziumOracleDbContainer extends ChaosContainer<DebeziumOracleDbContainer> {
@@ -50,12 +50,14 @@ public class DebeziumOracleDbContainer extends ChaosContainer<DebeziumOracleDbCo
.withExposedPorts(PORTS)
.withEnv("DBCA_TOTAL_MEMORY", "2048")
.withEnv("WEB_CONSOLE", "false")
- .withStartupTimeout(Duration.of(300, ChronoUnit.SECONDS))
.withCreateContainerCmdModifier(createContainerCmd -> {
createContainerCmd.withHostName(NAME);
createContainerCmd.withName(getContainerName());
})
- .waitingFor(new HostPortWaitStrategy());
+ // dbca keeps restarting the instance until database creation completes, so the database must not be
+ // reconfigured (shutdown/startup mount) before the entrypoint reports that it is ready
+ .waitingFor(Wait.forLogMessage(".*Database ready to use.*", 1)
+ .withStartupTimeout(Duration.of(600, ChronoUnit.SECONDS)));
}
}