diff --git a/pom.xml b/pom.xml
index 6050cb016e1..2acee12d32a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-relational-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-1815-tns-error-SNAPSHOT
pom
Spring Data Relational Parent
@@ -33,6 +33,7 @@
11.5.8.0
2.1.214
+ 5.1.0
2.7.1
3.1.3
12.2.0.jre11
@@ -40,7 +41,7 @@
42.6.0
23.4.0.24.05
-
+
4.2.0
1.0.1
diff --git a/spring-data-jdbc-distribution/pom.xml b/spring-data-jdbc-distribution/pom.xml
index 4626db43643..ab247d73188 100644
--- a/spring-data-jdbc-distribution/pom.xml
+++ b/spring-data-jdbc-distribution/pom.xml
@@ -14,7 +14,7 @@
org.springframework.data
spring-data-relational-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-1815-tns-error-SNAPSHOT
../pom.xml
diff --git a/spring-data-jdbc/pom.xml b/spring-data-jdbc/pom.xml
index aa44f718323..750b6f183c0 100644
--- a/spring-data-jdbc/pom.xml
+++ b/spring-data-jdbc/pom.xml
@@ -6,7 +6,7 @@
4.0.0
spring-data-jdbc
- 3.4.0-SNAPSHOT
+ 3.4.0-1815-tns-error-SNAPSHOT
Spring Data JDBC
Spring Data module for JDBC repositories.
@@ -15,7 +15,7 @@
org.springframework.data
spring-data-relational-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-1815-tns-error-SNAPSHOT
@@ -233,6 +233,12 @@
test
+
+ com.zaxxer
+ HikariCP
+ ${hikari.version}
+ test
+
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/DataSourceConfiguration.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/DataSourceConfiguration.java
index 3ad3edbaff7..dcea632b90a 100644
--- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/DataSourceConfiguration.java
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/DataSourceConfiguration.java
@@ -24,6 +24,8 @@
import javax.sql.DataSource;
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.awaitility.Awaitility;
diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/OracleDataSourceConfiguration.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/OracleDataSourceConfiguration.java
index dfc84dd1288..9e436d109a7 100644
--- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/OracleDataSourceConfiguration.java
+++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/OracleDataSourceConfiguration.java
@@ -27,12 +27,13 @@
import org.testcontainers.oracle.OracleContainer;
import org.testcontainers.utility.DockerImageName;
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+
/**
* {@link DataSource} setup for Oracle Database 23ai FREE. Starts a docker container with an Oracle database.
*
- * @see Oracle
- * Docker Image
+ * @see Oracle Docker Image
* @see Testcontainers Oracle
* @author Thomas Lang
* @author Jens Schauder
@@ -44,16 +45,16 @@ public class OracleDataSourceConfiguration extends DataSourceConfiguration {
private static final Log LOG = LogFactory.getLog(OracleDataSourceConfiguration.class);
- private static OracleContainer ORACLE_CONTAINER;
+ private static DataSource DATA_SOURCE;
public OracleDataSourceConfiguration(TestClass testClass, Environment environment) {
super(testClass, environment);
}
@Override
- protected DataSource createDataSource() {
+ protected synchronized DataSource createDataSource() {
- if (ORACLE_CONTAINER == null) {
+ if (DATA_SOURCE == null) {
LOG.info("Oracle starting...");
DockerImageName dockerImageName = DockerImageName.parse("gvenzl/oracle-free:23-slim");
@@ -63,21 +64,33 @@ protected DataSource createDataSource() {
container.start();
LOG.info("Oracle started");
- ORACLE_CONTAINER = container;
+ initDb(container.getJdbcUrl(),container.getUsername(), container.getPassword());
+
+ DATA_SOURCE = poolDataSource(new DriverManagerDataSource(container.getJdbcUrl(),
+ container.getUsername(), container.getPassword()));
}
+ return DATA_SOURCE;
+ }
+
+ private DataSource poolDataSource(DataSource dataSource) {
+
+ HikariConfig config = new HikariConfig();
+ config.setDataSource(dataSource);
- initDb();
+ config.setMaximumPoolSize(10);
+ config.setIdleTimeout(30000);
+ config.setMaxLifetime(600000);
+ config.setConnectionTimeout(30000);
- return new DriverManagerDataSource(ORACLE_CONTAINER.getJdbcUrl(), ORACLE_CONTAINER.getUsername(),
- ORACLE_CONTAINER.getPassword());
+ return new HikariDataSource(config);
}
- private void initDb() {
+ private void initDb(String jdbcUrl, String username, String password) {
- final DriverManagerDataSource dataSource = new DriverManagerDataSource(ORACLE_CONTAINER.getJdbcUrl(), "system",
- ORACLE_CONTAINER.getPassword());
+ final DriverManagerDataSource dataSource = new DriverManagerDataSource(jdbcUrl, "system",
+ password);
final JdbcTemplate jdbc = new JdbcTemplate(dataSource);
- jdbc.execute("GRANT ALL PRIVILEGES TO " + ORACLE_CONTAINER.getUsername());
+ jdbc.execute("GRANT ALL PRIVILEGES TO " + username);
}
@Override
diff --git a/spring-data-r2dbc/pom.xml b/spring-data-r2dbc/pom.xml
index 3168f9d4f6a..9a7c6b526bf 100644
--- a/spring-data-r2dbc/pom.xml
+++ b/spring-data-r2dbc/pom.xml
@@ -6,7 +6,7 @@
4.0.0
spring-data-r2dbc
- 3.4.0-SNAPSHOT
+ 3.4.0-1815-tns-error-SNAPSHOT
Spring Data R2DBC
Spring Data module for R2DBC
@@ -15,7 +15,7 @@
org.springframework.data
spring-data-relational-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-1815-tns-error-SNAPSHOT
diff --git a/spring-data-relational/pom.xml b/spring-data-relational/pom.xml
index 3ba39b861c3..df8b233543a 100644
--- a/spring-data-relational/pom.xml
+++ b/spring-data-relational/pom.xml
@@ -6,7 +6,7 @@
4.0.0
spring-data-relational
- 3.4.0-SNAPSHOT
+ 3.4.0-1815-tns-error-SNAPSHOT
Spring Data Relational
Spring Data Relational support
@@ -14,7 +14,7 @@
org.springframework.data
spring-data-relational-parent
- 3.4.0-SNAPSHOT
+ 3.4.0-1815-tns-error-SNAPSHOT
@@ -104,7 +104,6 @@
${jsqlparser}
test
-