9
pom.xml
9
pom.xml
@@ -320,6 +320,13 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.awaitility</groupId>
|
||||
<artifactId>awaitility</artifactId>
|
||||
<version>4.0.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -464,7 +471,6 @@
|
||||
<profile>
|
||||
<id>java11</id>
|
||||
|
||||
<!-- enable once oracle-r2db is available from Maven Central
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.r2dbc</groupId>
|
||||
@@ -474,7 +480,6 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
-->
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
|
||||
@@ -24,7 +24,10 @@ import java.util.stream.Stream;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.awaitility.Awaitility;
|
||||
|
||||
import org.springframework.data.r2dbc.testing.ExternalDatabase.ProvidedDatabase;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -119,6 +122,13 @@ public class OracleTestSupport {
|
||||
|
||||
testContainerDatabase = ProvidedDatabase.builder(container) //
|
||||
.database("XEPDB1").build();
|
||||
|
||||
DataSource dataSource = createDataSource(testContainerDatabase);
|
||||
|
||||
Awaitility.await().ignoreExceptions().until(() -> {
|
||||
new JdbcTemplate(dataSource).queryForList("SELECT 'Hello, Oracle' FROM sys.dual");
|
||||
return true;
|
||||
});
|
||||
} catch (IllegalStateException ise) {
|
||||
// docker not available.
|
||||
testContainerDatabase = ExternalDatabase.unavailable();
|
||||
|
||||
Reference in New Issue
Block a user