Skip to content

Commit d5f49b1

Browse files
committed
Enable Oracle integration tests.
Closes #560
1 parent f0ae9aa commit d5f49b1

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,13 @@
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>
@@ -464,7 +471,6 @@
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>
@@ -474,7 +480,6 @@
474480
</dependency>
475481
</dependencies>
476482

477-
-->
478483
</profile>
479484
</profiles>
480485

src/test/java/org/springframework/data/r2dbc/testing/OracleTestSupport.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424

2525
import javax.sql.DataSource;
2626

27+
import org.awaitility.Awaitility;
28+
2729
import org.springframework.data.r2dbc.testing.ExternalDatabase.ProvidedDatabase;
30+
import org.springframework.jdbc.core.JdbcTemplate;
2831
import org.springframework.jdbc.datasource.DriverManagerDataSource;
2932
import 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();

0 commit comments

Comments
 (0)