File tree Expand file tree Collapse file tree 4 files changed +13
-7
lines changed
src/test/java/org/springframework/data/jdbc/testing
src/test/java/org/springframework/data/r2dbc/testing Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 208208
209209 <dependency >
210210 <groupId >com.oracle.database.jdbc</groupId >
211- <artifactId >ojdbc8 </artifactId >
211+ <artifactId >ojdbc11 </artifactId >
212212 <version >${oracle.version} </version >
213213 <scope >test</scope >
214214 </dependency >
251251
252252 <dependency >
253253 <groupId >org.testcontainers</groupId >
254- <artifactId >oracle-xe </artifactId >
254+ <artifactId >oracle-free </artifactId >
255255 <scope >test</scope >
256256 </dependency >
257257
Original file line number Diff line number Diff line change 2424import org .springframework .jdbc .core .JdbcTemplate ;
2525import org .springframework .jdbc .datasource .DriverManagerDataSource ;
2626import org .springframework .jdbc .datasource .init .ResourceDatabasePopulator ;
27- import org .testcontainers .containers .OracleContainer ;
27+ import org .testcontainers .oracle .OracleContainer ;
28+ import org .testcontainers .utility .DockerImageName ;
2829
2930/**
3031 * {@link DataSource} setup for Oracle Database XE. Starts a docker container with an Oracle database.
@@ -50,7 +51,10 @@ protected DataSource createDataSource() {
5051 if (ORACLE_CONTAINER == null ) {
5152
5253 LOG .info ("Oracle starting..." );
53- OracleContainer container = new OracleContainer ("gvenzl/oracle-xe:21.3.0-slim" ).withReuse (true );
54+ DockerImageName dockerImageName = DockerImageName .parse ("gvenzl/oracle-free:23.3-slim" );
55+ OracleContainer container = new OracleContainer (dockerImageName ) //
56+ .withStartupTimeoutSeconds (200 ) //
57+ .withReuse (true );
5458 container .start ();
5559 LOG .info ("Oracle started" );
5660
Original file line number Diff line number Diff line change 310310
311311 <dependency >
312312 <groupId >org.testcontainers</groupId >
313- <artifactId >oracle-xe </artifactId >
313+ <artifactId >oracle-free </artifactId >
314314 <scope >test</scope >
315315 </dependency >
316316
Original file line number Diff line number Diff line change 2929import org .springframework .jdbc .core .JdbcTemplate ;
3030import org .springframework .jdbc .datasource .DriverManagerDataSource ;
3131import org .springframework .util .ClassUtils ;
32- import org .testcontainers .containers .OracleContainer ;
32+ import org .testcontainers .oracle .OracleContainer ;
3333
3434/**
3535 * Utility class for testing against Oracle.
@@ -128,7 +128,9 @@ private static ExternalDatabase testContainer() {
128128 if (testContainerDatabase == null ) {
129129
130130 try {
131- OracleContainer container = new OracleContainer ("gvenzl/oracle-xe:21.3.0-slim" ).withReuse (true );
131+ OracleContainer container = new OracleContainer ("23.3-slim" ) //
132+ .withReuse (true ) //
133+ .withStartupTimeoutSeconds (200 ); // the default of 60s isn't sufficient
132134 container .start ();
133135
134136 testContainerDatabase = ProvidedDatabase .builder (container ) //
You can’t perform that action at this time.
0 commit comments