@@ -84,19 +84,32 @@ class OracleDatabase implements TestableDatabase {
84
84
}
85
85
}
86
86
87
- public static final OracleContainer oracle = new OracleContainer ( imageName ( "gvenzl/oracle-xe" , "21-slim-faststart" ) )
87
+ public static final OracleContainer oracle = new OracleContainer (
88
+ imageName ( "gvenzl/oracle-free" , "23.2.0-faststart" )
89
+ .asCompatibleSubstituteFor ( "gvenzl/oracle-xe" ) )
88
90
.withUsername ( DatabaseConfiguration .USERNAME )
89
91
.withPassword ( DatabaseConfiguration .PASSWORD )
90
92
.withDatabaseName ( DatabaseConfiguration .DB_NAME )
91
- .withLogConsumer ( of -> System . out . println ( of .getUtf8String () ) )
93
+ .withLogConsumer ( of -> logContainerOutput ( of .getUtf8String () ) )
92
94
.withReuse ( true )
95
+ .withStartupAttempts ( 1 )
93
96
94
97
// We need to limit the maximum amount of CPUs being used by the container;
95
98
// otherwise the hardcoded memory configuration of the DB might not be enough to successfully boot it.
96
99
// See https://github.com/gvenzl/oci-oracle-xe/issues/64
97
100
// I choose to limit it to "2 cpus": should be more than enough for any local testing needs,
98
101
// and keeps things simple.
99
102
.withCreateContainerCmdModifier ( cmd -> cmd .getHostConfig ().withCpuCount ( 2L ) );
103
+ ;
104
+
105
+ private static void logContainerOutput (String line ) {
106
+ System .out .print ( line );
107
+ }
108
+
109
+ //Start the container only - useful for testing and CLI
110
+ public static void main (String [] args ) {
111
+ oracle .start ();
112
+ }
100
113
101
114
@ Override
102
115
public String getJdbcUrl () {
0 commit comments