@@ -46,18 +46,8 @@ public static JdbcDatabaseContainer<?> createContainer(String dialectName) {
4646 .acceptLicense ()
4747 .withPassword ("TestPass123!" )
4848 .withReuse (true );
49- case "oracle" :
50- OracleContainer oracleContainer = new OracleContainer (
51- DockerImageName .parse ("gvenzl/oracle-free:23-slim-faststart" )
52- .asCompatibleSubstituteFor ("gvenzl/oracle-xe" ))
53- .withPassword ("oracle123" )
54- .withSharedMemorySize (1073741824L )
55- .withStartupTimeoutSeconds (900 )
56- .withEnv ("ORACLE_CHARACTERSET" , "AL32UTF8" );
57-
58- if (!isCi ) oracleContainer .withReuse (true );
59-
60- return new OracleContainer (
49+ case "oracle" : {
50+ OracleContainer oracle = new OracleContainer (
6151 DockerImageName .parse ("gvenzl/oracle-free:23-slim-faststart" )
6252 .asCompatibleSubstituteFor ("gvenzl/oracle-xe" )) {
6353 @ Override
@@ -68,8 +58,14 @@ public String getDatabaseName() {
6858 .withPassword ("oracle123" )
6959 .withSharedMemorySize (1073741824L )
7060 .withStartupTimeoutSeconds (900 )
71- .withEnv ("ORACLE_CHARACTERSET" , "AL32UTF8" )
72- .withReuse (true );
61+ .withEnv ("ORACLE_CHARACTERSET" , "AL32UTF8" );
62+
63+ if (!isCi ) {
64+ oracle .withReuse (true );
65+ }
66+
67+ return oracle ;
68+ }
7369 case "postgresql" :
7470 return new PostgreSQLContainer <>(DockerImageName .parse ("postgres:15" ))
7571 .withDatabaseName ("testdb" )
0 commit comments