[FLINK-35503] Add support for running Oracle connector unit test on ARM architecture (#3600)

pull/3613/head
gongzhongqiang 4 months ago committed by GitHub
parent 4b4b8ea5bb
commit a5b666a325
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -29,6 +29,7 @@ import org.junit.BeforeClass;
import org.junit.Rule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.DockerClientFactory;
import org.testcontainers.containers.OracleContainer;
import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.lifecycle.Startables;
@ -73,7 +74,16 @@ public class OracleSourceTestBase extends TestLogger {
public static final OracleContainer ORACLE_CONTAINER =
new OracleContainer(
DockerImageName.parse("goodboy008/oracle-19.3.0-ee").withTag("non-cdb"))
DockerImageName.parse("goodboy008/oracle-19.3.0-ee")
.withTag(
DockerClientFactory.instance()
.client()
.versionCmd()
.exec()
.getArch()
.equals("amd64")
? "non-cdb"
: "arm-non-cdb"))
.withUsername(CONNECTOR_USER)
.withPassword(CONNECTOR_PWD)
.withDatabaseName(ORACLE_DATABASE)

@ -843,6 +843,9 @@ public class OracleConnectorITCase {
@Test
public void testSnapshotToStreamingSwitchPendingTransactions() throws Exception {
createAndInitialize("product.sql");
Assume.assumeFalse(parallelismSnapshot);
CompletableFuture<Void> finishFuture = createRecordInserters();

@ -26,6 +26,7 @@ import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.DockerClientFactory;
import org.testcontainers.containers.OracleContainer;
import org.testcontainers.containers.output.Slf4jLogConsumer;
import org.testcontainers.lifecycle.Startables;
@ -66,7 +67,17 @@ public class OracleE2eITCase extends FlinkContainerTestEnvironment {
LOG.info("Starting containers...");
oracle =
new OracleContainer(DockerImageName.parse(ORACLE_IMAGE).withTag("non-cdb"))
new OracleContainer(
DockerImageName.parse(ORACLE_IMAGE)
.withTag(
DockerClientFactory.instance()
.client()
.versionCmd()
.exec()
.getArch()
.equals("amd64")
? "non-cdb"
: "arm-non-cdb"))
.withUsername(CONNECTOR_USER)
.withPassword(CONNECTOR_PWD)
.withDatabaseName(ORACLE_DATABASE)

Loading…
Cancel
Save