File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
src/test/java/org/springframework/data/r2dbc/testing Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 320320 <scope >test</scope >
321321 </dependency >
322322
323+ <dependency >
324+ <groupId >org.awaitility</groupId >
325+ <artifactId >awaitility</artifactId >
326+ <version >4.0.3</version >
327+ <scope >test</scope >
328+ </dependency >
329+
323330 </dependencies >
324331
325332 <build >
464471 <profile >
465472 <id >java11</id >
466473
467- <!-- enable once oracle-r2db is available from Maven Central
468474 <dependencies >
469475 <dependency >
470476 <groupId >com.oracle.database.r2dbc</groupId >
474480 </dependency >
475481 </dependencies >
476482
477- -->
478483 </profile >
479484 </profiles >
480485
Original file line number Diff line number Diff line change 2424
2525import javax .sql .DataSource ;
2626
27+ import org .awaitility .Awaitility ;
28+
2729import org .springframework .data .r2dbc .testing .ExternalDatabase .ProvidedDatabase ;
30+ import org .springframework .jdbc .core .JdbcTemplate ;
2831import org .springframework .jdbc .datasource .DriverManagerDataSource ;
2932import org .springframework .util .ClassUtils ;
3033
@@ -119,6 +122,13 @@ private static ExternalDatabase testContainer() {
119122
120123 testContainerDatabase = ProvidedDatabase .builder (container ) //
121124 .database ("XEPDB1" ).build ();
125+
126+ DataSource dataSource = createDataSource (testContainerDatabase );
127+
128+ Awaitility .await ().ignoreExceptions ().until (() -> {
129+ new JdbcTemplate (dataSource ).queryForList ("SELECT 'Hello, Oracle' FROM sys.dual" );
130+ return true ;
131+ });
122132 } catch (IllegalStateException ise ) {
123133 // docker not available.
124134 testContainerDatabase = ExternalDatabase .unavailable ();
You can’t perform that action at this time.
0 commit comments