HHH-15532 Update PostgreSQL testing to version 10 and 14

This commit is contained in:
Christian Beikov 2022-09-21 13:58:41 +02:00
parent e51da4ee3b
commit 6321016051
7 changed files with 27 additions and 14 deletions

View File

@ -42,7 +42,7 @@ jobs:
- rdbms: mysql8 - rdbms: mysql8
- rdbms: mariadb - rdbms: mariadb
- rdbms: postgresql - rdbms: postgresql
- rdbms: postgresql_13 - rdbms: postgresql_14
- rdbms: oracle - rdbms: oracle
- rdbms: db2 - rdbms: db2
- rdbms: mssql - rdbms: mssql

10
Jenkinsfile vendored
View File

@ -34,7 +34,7 @@ stage('Configure') {
// new BuildEnvironment( dbName: 'mysql8' ), // new BuildEnvironment( dbName: 'mysql8' ),
// new BuildEnvironment( dbName: 'mariadb' ), // new BuildEnvironment( dbName: 'mariadb' ),
// new BuildEnvironment( dbName: 'postgresql' ), // new BuildEnvironment( dbName: 'postgresql' ),
// new BuildEnvironment( dbName: 'postgresql_13' ), // new BuildEnvironment( dbName: 'postgresql_14' ),
// new BuildEnvironment( dbName: 'oracle' ), // new BuildEnvironment( dbName: 'oracle' ),
new BuildEnvironment( dbName: 'oracle_ee' ), new BuildEnvironment( dbName: 'oracle_ee' ),
// new BuildEnvironment( dbName: 'db2' ), // new BuildEnvironment( dbName: 'db2' ),
@ -146,12 +146,12 @@ stage('Build') {
sh "./docker_db.sh postgresql" sh "./docker_db.sh postgresql"
state[buildEnv.tag]['containerName'] = "postgres" state[buildEnv.tag]['containerName'] = "postgres"
break; break;
case "postgresql_13": case "postgresql_14":
// use the postgis image to enable the PGSQL GIS (spatial) extension // use the postgis image to enable the PGSQL GIS (spatial) extension
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') { docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('postgis/postgis:13-3.1').pull() docker.image('postgis/postgis:14-3.3').pull()
} }
sh "./docker_db.sh postgresql_13" sh "./docker_db.sh postgresql_14"
state[buildEnv.tag]['containerName'] = "postgres" state[buildEnv.tag]['containerName'] = "postgres"
break; break;
case "oracle": case "oracle":
@ -207,7 +207,7 @@ stage('Build') {
runTest("-Pdb=tidb -DdbHost=localhost:4000${state[buildEnv.tag]['additionalOptions']}", 'TIDB') runTest("-Pdb=tidb -DdbHost=localhost:4000${state[buildEnv.tag]['additionalOptions']}", 'TIDB')
break; break;
case "postgresql": case "postgresql":
case "postgresql_13": case "postgresql_14":
runTest("-Pdb=pgsql_ci${state[buildEnv.tag]['additionalOptions']}") runTest("-Pdb=pgsql_ci${state[buildEnv.tag]['additionalOptions']}")
break; break;
case "oracle": case "oracle":

View File

@ -173,12 +173,12 @@ The following table illustrates a list of commands for various databases that ca
|`./docker_db.sh mariadb` |`./docker_db.sh mariadb`
|`./gradlew test -Pdb=mariadb_ci` |`./gradlew test -Pdb=mariadb_ci`
|PostgreSQL 9.5 |PostgreSQL 10
|`./docker_db.sh postgresql` |`./docker_db.sh postgresql`
|`./gradlew test -Pdb=pgsql_ci` |`./gradlew test -Pdb=pgsql_ci`
|PostgreSQL 13 |PostgreSQL 14
|`./docker_db.sh postgresql_13` |`./docker_db.sh postgresql_14`
|`./gradlew test -Pdb=pgsql_ci` |`./gradlew test -Pdb=pgsql_ci`
|EnterpriseDB |EnterpriseDB

View File

@ -13,7 +13,7 @@ elif [ "$RDBMS" == "mariadb" ]; then
goal="-Pdb=mariadb_ci" goal="-Pdb=mariadb_ci"
elif [ "$RDBMS" == "postgresql" ]; then elif [ "$RDBMS" == "postgresql" ]; then
goal="-Pdb=pgsql_ci" goal="-Pdb=pgsql_ci"
elif [ "$RDBMS" == "postgresql_13" ]; then elif [ "$RDBMS" == "postgresql_14" ]; then
goal="-Pdb=pgsql_ci" goal="-Pdb=pgsql_ci"
elif [ "$RDBMS" == "oracle" ]; then elif [ "$RDBMS" == "oracle" ]; then
# I have no idea why, but these tests don't work on GH Actions # I have no idea why, but these tests don't work on GH Actions

View File

@ -10,8 +10,8 @@ elif [ "$RDBMS" == 'mariadb' ]; then
bash $DIR/../docker_db.sh mariadb bash $DIR/../docker_db.sh mariadb
elif [ "$RDBMS" == 'postgresql' ]; then elif [ "$RDBMS" == 'postgresql' ]; then
bash $DIR/../docker_db.sh postgresql bash $DIR/../docker_db.sh postgresql
elif [ "$RDBMS" == 'postgresql_13' ]; then elif [ "$RDBMS" == 'postgresql_14' ]; then
bash $DIR/../docker_db.sh postgresql_13 bash $DIR/../docker_db.sh postgresql_14
elif [ "$RDBMS" == 'db2' ]; then elif [ "$RDBMS" == 'db2' ]; then
bash $DIR/../docker_db.sh db2 bash $DIR/../docker_db.sh db2
elif [ "$RDBMS" == 'oracle' ]; then elif [ "$RDBMS" == 'oracle' ]; then

View File

@ -91,7 +91,7 @@ mariadb() {
} }
postgresql() { postgresql() {
postgresql_9_5 postgresql_10
} }
postgresql_9_5() { postgresql_9_5() {
@ -99,11 +99,21 @@ postgresql_9_5() {
$CONTAINER_CLI run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d docker.io/postgis/postgis:9.5-2.5 $CONTAINER_CLI run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d docker.io/postgis/postgis:9.5-2.5
} }
postgresql_10() {
$CONTAINER_CLI rm -f postgres || true
$CONTAINER_CLI run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d docker.io/postgis/postgis:10-2.5
}
postgresql_13() { postgresql_13() {
$CONTAINER_CLI rm -f postgres || true $CONTAINER_CLI rm -f postgres || true
$CONTAINER_CLI run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d docker.io/postgis/postgis:13-3.1 $CONTAINER_CLI run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d docker.io/postgis/postgis:13-3.1
} }
postgresql_14() {
$CONTAINER_CLI rm -f postgres || true
$CONTAINER_CLI run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d docker.io/postgis/postgis:14-3.3
}
edb() { edb() {
#$CONTAINER_CLI login containers.enterprisedb.com #$CONTAINER_CLI login containers.enterprisedb.com
$CONTAINER_CLI rm -f edb || true $CONTAINER_CLI rm -f edb || true
@ -534,7 +544,9 @@ if [ -z ${1} ]; then
echo -e "\toracle_21" echo -e "\toracle_21"
echo -e "\toracle_ee" echo -e "\toracle_ee"
echo -e "\tpostgis" echo -e "\tpostgis"
echo -e "\tpostgresql_14"
echo -e "\tpostgresql_13" echo -e "\tpostgresql_13"
echo -e "\tpostgresql_10"
echo -e "\tpostgresql_9_5" echo -e "\tpostgresql_9_5"
echo -e "\tpostgresql" echo -e "\tpostgresql"
echo -e "\tsybase" echo -e "\tsybase"

View File

@ -29,7 +29,8 @@ import static org.junit.Assert.assertEquals;
@SkipForDialect(dialectClass = HSQLDialect.class) @SkipForDialect(dialectClass = HSQLDialect.class)
@SkipForDialect(dialectClass = DerbyDialect.class) @SkipForDialect(dialectClass = DerbyDialect.class)
@SkipForDialect(dialectClass = SybaseASEDialect.class) @SkipForDialect(dialectClass = SybaseASEDialect.class)
@SkipForDialect(dialectClass = PostgreSQLDialect.class, majorVersion = 9) @SkipForDialect(dialectClass = PostgreSQLDialect.class, majorVersion = 10)
@SkipForDialect(dialectClass = PostgreSQLDialect.class, majorVersion = 11) // 'generated always' was added in 12
public class GeneratedAlwaysTest { public class GeneratedAlwaysTest {
@Test @Test