Skip to content

Commit

Permalink
HHH-15532 Update PostgreSQL testing to version 10 and 14
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Sep 21, 2022
1 parent e51da4e commit 6321016
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contributor-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- rdbms: mysql8
- rdbms: mariadb
- rdbms: postgresql
- rdbms: postgresql_13
- rdbms: postgresql_14
- rdbms: oracle
- rdbms: db2
- rdbms: mssql
Expand Down
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stage('Configure') {
// new BuildEnvironment( dbName: 'mysql8' ),
// new BuildEnvironment( dbName: 'mariadb' ),
// new BuildEnvironment( dbName: 'postgresql' ),
// new BuildEnvironment( dbName: 'postgresql_13' ),
// new BuildEnvironment( dbName: 'postgresql_14' ),
// new BuildEnvironment( dbName: 'oracle' ),
new BuildEnvironment( dbName: 'oracle_ee' ),
// new BuildEnvironment( dbName: 'db2' ),
Expand Down Expand Up @@ -146,12 +146,12 @@ stage('Build') {
sh "./docker_db.sh postgresql"
state[buildEnv.tag]['containerName'] = "postgres"
break;
case "postgresql_13":
case "postgresql_14":
// use the postgis image to enable the PGSQL GIS (spatial) extension
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"
break;
case "oracle":
Expand Down Expand Up @@ -207,7 +207,7 @@ stage('Build') {
runTest("-Pdb=tidb -DdbHost=localhost:4000${state[buildEnv.tag]['additionalOptions']}", 'TIDB')
break;
case "postgresql":
case "postgresql_13":
case "postgresql_14":
runTest("-Pdb=pgsql_ci${state[buildEnv.tag]['additionalOptions']}")
break;
case "oracle":
Expand Down
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ The following table illustrates a list of commands for various databases that ca
|`./docker_db.sh mariadb`
|`./gradlew test -Pdb=mariadb_ci`

|PostgreSQL 9.5
|PostgreSQL 10
|`./docker_db.sh postgresql`
|`./gradlew test -Pdb=pgsql_ci`

|PostgreSQL 13
|`./docker_db.sh postgresql_13`
|PostgreSQL 14
|`./docker_db.sh postgresql_14`
|`./gradlew test -Pdb=pgsql_ci`

|EnterpriseDB
Expand Down
2 changes: 1 addition & 1 deletion ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ elif [ "$RDBMS" == "mariadb" ]; then
goal="-Pdb=mariadb_ci"
elif [ "$RDBMS" == "postgresql" ]; then
goal="-Pdb=pgsql_ci"
elif [ "$RDBMS" == "postgresql_13" ]; then
elif [ "$RDBMS" == "postgresql_14" ]; then
goal="-Pdb=pgsql_ci"
elif [ "$RDBMS" == "oracle" ]; then
# I have no idea why, but these tests don't work on GH Actions
Expand Down
4 changes: 2 additions & 2 deletions ci/database-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ elif [ "$RDBMS" == 'mariadb' ]; then
bash $DIR/../docker_db.sh mariadb
elif [ "$RDBMS" == 'postgresql' ]; then
bash $DIR/../docker_db.sh postgresql
elif [ "$RDBMS" == 'postgresql_13' ]; then
bash $DIR/../docker_db.sh postgresql_13
elif [ "$RDBMS" == 'postgresql_14' ]; then
bash $DIR/../docker_db.sh postgresql_14
elif [ "$RDBMS" == 'db2' ]; then
bash $DIR/../docker_db.sh db2
elif [ "$RDBMS" == 'oracle' ]; then
Expand Down
14 changes: 13 additions & 1 deletion docker_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,29 @@ mariadb() {
}

postgresql() {
postgresql_9_5
postgresql_10
}

postgresql_9_5() {
$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: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() {
$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
}

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() {
#$CONTAINER_CLI login containers.enterprisedb.com
$CONTAINER_CLI rm -f edb || true
Expand Down Expand Up @@ -534,7 +544,9 @@ if [ -z ${1} ]; then
echo -e "\toracle_21"
echo -e "\toracle_ee"
echo -e "\tpostgis"
echo -e "\tpostgresql_14"
echo -e "\tpostgresql_13"
echo -e "\tpostgresql_10"
echo -e "\tpostgresql_9_5"
echo -e "\tpostgresql"
echo -e "\tsybase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
@SkipForDialect(dialectClass = HSQLDialect.class)
@SkipForDialect(dialectClass = DerbyDialect.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 {

@Test
Expand Down

0 comments on commit 6321016

Please sign in to comment.