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 320
320
<scope >test</scope >
321
321
</dependency >
322
322
323
+ <dependency >
324
+ <groupId >org.awaitility</groupId >
325
+ <artifactId >awaitility</artifactId >
326
+ <version >4.0.3</version >
327
+ <scope >test</scope >
328
+ </dependency >
329
+
323
330
</dependencies >
324
331
325
332
<build >
464
471
<profile >
465
472
<id >java11</id >
466
473
467
- <!-- enable once oracle-r2db is available from Maven Central
468
474
<dependencies >
469
475
<dependency >
470
476
<groupId >com.oracle.database.r2dbc</groupId >
474
480
</dependency >
475
481
</dependencies >
476
482
477
- -->
478
483
</profile >
479
484
</profiles >
480
485
Original file line number Diff line number Diff line change 24
24
25
25
import javax .sql .DataSource ;
26
26
27
+ import org .awaitility .Awaitility ;
28
+
27
29
import org .springframework .data .r2dbc .testing .ExternalDatabase .ProvidedDatabase ;
30
+ import org .springframework .jdbc .core .JdbcTemplate ;
28
31
import org .springframework .jdbc .datasource .DriverManagerDataSource ;
29
32
import org .springframework .util .ClassUtils ;
30
33
@@ -119,6 +122,13 @@ private static ExternalDatabase testContainer() {
119
122
120
123
testContainerDatabase = ProvidedDatabase .builder (container ) //
121
124
.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
+ });
122
132
} catch (IllegalStateException ise ) {
123
133
// docker not available.
124
134
testContainerDatabase = ExternalDatabase .unavailable ();
You can’t perform that action at this time.
0 commit comments