Switch to Testcontainers Oracle Free.
Timeout increased from the default because that cause problems on CI. Brought SD JDBC now uses `ojdbc11` as R2DBC. Closes #1665 Original pull request #1668
This commit is contained in:
@@ -148,7 +148,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<artifactId>ojdbc11</artifactId>
|
||||
<version>${oracle.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -229,7 +229,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>oracle-xe</artifactId>
|
||||
<artifactId>oracle-free</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.core.env.Environment;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||
import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
|
||||
import org.testcontainers.containers.OracleContainer;
|
||||
import org.testcontainers.oracle.OracleContainer;
|
||||
import org.testcontainers.utility.DockerImageName;
|
||||
|
||||
/**
|
||||
@@ -55,10 +55,9 @@ public class OracleDataSourceConfiguration extends DataSourceConfiguration {
|
||||
if (ORACLE_CONTAINER == null) {
|
||||
|
||||
LOG.info("Oracle starting...");
|
||||
DockerImageName dockerImageName = DockerImageName.parse("gvenzl/oracle-free:23-slim")
|
||||
.asCompatibleSubstituteFor("gvenzl/oracle-xe");
|
||||
OracleContainer container = new OracleContainer(dockerImageName)
|
||||
.withDatabaseName("freepdb2")
|
||||
DockerImageName dockerImageName = DockerImageName.parse("gvenzl/oracle-free:23.3-slim");
|
||||
OracleContainer container = new OracleContainer(dockerImageName) //
|
||||
.withStartupTimeoutSeconds(200) //
|
||||
.withReuse(true);
|
||||
container.start();
|
||||
LOG.info("Oracle started");
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>oracle-xe</artifactId>
|
||||
<artifactId>oracle-free</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.data.r2dbc.testing.ExternalDatabase.ProvidedDatabase;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.testcontainers.containers.OracleContainer;
|
||||
import org.testcontainers.oracle.OracleContainer;
|
||||
|
||||
/**
|
||||
* Utility class for testing against Oracle.
|
||||
@@ -128,7 +128,9 @@ public class OracleTestSupport {
|
||||
if (testContainerDatabase == null) {
|
||||
|
||||
try {
|
||||
OracleContainer container = new OracleContainer("gvenzl/oracle-xe:21.3.0-slim").withReuse(true);
|
||||
OracleContainer container = new OracleContainer("23.3-slim") //
|
||||
.withReuse(true) //
|
||||
.withStartupTimeoutSeconds(200); // the default of 60s isn't sufficient
|
||||
container.start();
|
||||
|
||||
testContainerDatabase = ProvidedDatabase.builder(container) //
|
||||
|
||||
Reference in New Issue
Block a user