Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions .github/workflows/databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,98 @@ jobs:
- name: 'Remove snapshots before caching'
if: always()
run: find ~/.m2 -name '*SNAPSHOT' | xargs rm -Rf

hsqldb:
needs: check
if: needs.check.outputs.should_run == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
name: build (Java 21, test-hsqldb)
steps:
- uses: actions/checkout@v7.0.1
- name: Setup Java JDK
uses: actions/setup-java@v6.0.0
with:
distribution: 'zulu'
java-version: 21
- name: 'Cache Maven packages'
uses: actions/cache@v6.1.0
with:
path: ~/.m2
key: cache-21-test-hsqldb
restore-keys: cache-21-test-hsqldb
- name: 'Build with Maven'
run: mvn -Ptest-hsqldb -B clean install --file pom.xml
- name: 'Remove snapshots before caching'
if: always()
run: find ~/.m2 -name '*SNAPSHOT' | xargs rm -Rf

mssql:
needs: check
if: needs.check.outputs.should_run == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ['2017-latest', 'latest']
name: build (Java 21, test-mssql-docker, ${{ matrix.version }})
services:
mssql:
image: mcr.microsoft.com/mssql/server:${{ matrix.version }}
env:
ACCEPT_EULA: Y
SA_PASSWORD: OpenJP8tst
ports:
- 1433:1433
steps:
- uses: actions/checkout@v7.0.1
- name: Setup Java JDK
uses: actions/setup-java@v6.0.0
with:
distribution: 'zulu'
java-version: 21
- name: 'Cache Maven packages'
uses: actions/cache@v6.1.0
with:
path: ~/.m2
key: cache-21-test-mssql-docker
restore-keys: cache-21-test-mssql-docker
- name: 'Build with Maven'
run: mvn -Ptest-mssql-docker -B clean install --file pom.xml
- name: 'Remove snapshots before caching'
if: always()
run: find ~/.m2 -name '*SNAPSHOT' | xargs rm -Rf

oracle:
needs: check
if: needs.check.outputs.should_run == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ['23-slim']
name: build (Java 21, test-oracle-docker, ${{ matrix.version }})
steps:
- uses: actions/checkout@v7.0.1
- name: Setup Java JDK
uses: actions/setup-java@v6.0.0
with:
distribution: 'zulu'
java-version: 21
- name: 'Cache Maven packages'
uses: actions/cache@v6.1.0
with:
path: ~/.m2
key: cache-21-test-oracle-docker
restore-keys: cache-21-test-oracle-docker
- name: 'Start Oracle DB v${{ matrix.version }}'
run: mvn -N -B -Ptest-oracle-docker -Doracle.server.version=${{ matrix.version }} docker:start
- name: 'Build with Maven'
run: mvn -Ptest-oracle-docker -B clean install --file pom.xml
- name: 'Stop Oracle DB v${{ matrix.version }}'
if: always()
run: mvn -N -B -Ptest-oracle-docker -Doracle.server.version=${{ matrix.version }} docker:stop
- name: 'Remove snapshots before caching'
if: always()
run: find ~/.m2 -name '*SNAPSHOT' | xargs rm -Rf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
import org.apache.openjpa.jdbc.sql.DB2Dictionary;
import org.apache.openjpa.jdbc.sql.DBDictionary;
import org.apache.openjpa.jdbc.sql.OracleDictionary;
import org.apache.openjpa.persistence.OpenJPAEntityManager;
import org.apache.openjpa.persistence.OpenJPAPersistence;
import org.apache.openjpa.persistence.PessimisticLockException;
Expand All @@ -45,7 +44,7 @@ public void setUp() throws Exception {
protected boolean skipTest() {
if (emf.getConfiguration() instanceof JDBCConfiguration) {
DBDictionary inst = ((JDBCConfiguration) emf.getConfiguration()).getDBDictionaryInstance();
return !((inst instanceof DB2Dictionary) || (inst instanceof OracleDictionary));
return !((inst instanceof DB2Dictionary));
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
import org.apache.openjpa.jdbc.sql.DBDictionary;
import org.apache.openjpa.jdbc.sql.OracleDictionary;
import org.apache.openjpa.jdbc.sql.SolidDBDictionary;
import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
import org.apache.openjpa.persistence.exception.PObject;
Expand All @@ -52,7 +53,7 @@ public void setUp() {
assertNotNull(tempEMF);
DBDictionary dict = ((JDBCConfiguration)tempEMF.getConfiguration()).getDBDictionaryInstance();
assertNotNull(dict);
if (!dict.supportsSelectForUpdate || !dict.supportsQueryTimeout || dict instanceof SolidDBDictionary)
if (!dict.supportsSelectForUpdate || !dict.supportsQueryTimeout || dict instanceof SolidDBDictionary || dict instanceof OracleDictionary)
setTestsDisabled(true);

if (emf == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.apache.openjpa.jdbc.sql.DBDictionary;
import org.apache.openjpa.jdbc.sql.DerbyDictionary;
import org.apache.openjpa.jdbc.sql.InformixDictionary;
import org.apache.openjpa.jdbc.sql.OracleDictionary;
import org.apache.openjpa.lib.log.Log;
import org.apache.openjpa.persistence.LockTimeoutException;
import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI;
Expand Down Expand Up @@ -71,8 +72,9 @@ public void setUp() {
assertNotNull(tempEMF);
dict = ((JDBCConfiguration)tempEMF.getConfiguration()).getDBDictionaryInstance();
assertNotNull(dict);
if (!dict.supportsQueryTimeout)
if (!dict.supportsQueryTimeout || dict instanceof OracleDictionary) {
setTestsDisabled(true);
}
if (emf == null) {
closeEMF(tempEMF);
}
Expand Down
Loading