HHH-14446 Add integration test profiles for mysql and postgis

This commit is contained in:
Karel Maesen 2021-02-08 23:33:03 +01:00 committed by Christian Beikov
parent 7e2747516a
commit 031f12a1ec
6 changed files with 21 additions and 8 deletions

View File

@ -7,7 +7,7 @@ mysql_5_7() {
mysql_8_0() {
docker rm -f mysql || true
docker run --name mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -p3306:3306 -d mysql:8.0.21 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
docker run --name mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -p3306:3306 -d mysql:8.0.21 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
}
mariadb() {
@ -20,6 +20,11 @@ postgresql_9_5() {
docker run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d postgres:9.5
}
postgis_9_6(){
docker rm -f postgis || true
docker run --name postgis -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d mdillon/postgis:9.6
}
db2() {
docker rm -f db2 || true
docker run --name db2 --privileged -e DB2INSTANCE=orm_test -e DB2INST1_PASSWORD=orm_test -e DBNAME=orm_test -e LICENSE=accept -e AUTOCONFIG=false -e ARCHIVE_LOGS=false -e TO_CREATE_SAMPLEDB=false -e REPODB=false -p 50000:50000 -d ibmcom/db2:11.5.5.0

View File

@ -69,6 +69,14 @@ ext {
'jdbc.pass' : 'hibernate_orm_test',
'jdbc.url' : 'jdbc:mysql://127.0.0.1/hibernate_orm_test?useSSL=false'
],
// uses docker mysql_8_0
mysql8_spatial_ci: [
'db.dialect' : 'org.hibernate.spatial.dialect.mysql.MySQL8SpatialDialect',
'jdbc.driver': 'com.mysql.cj.jdbc.Driver',
'jdbc.user' : 'hibernate_orm_test',
'jdbc.pass' : 'hibernate_orm_test',
'jdbc.url' : 'jdbc:mysql://' + dbHost + '/hibernate_orm_test?allowPublicKeyRetrieval=true&useSSL=false'
],
mariadb : [
'db.dialect' : 'org.hibernate.dialect.MariaDB103Dialect',
'jdbc.driver': 'org.mariadb.jdbc.Driver',

View File

@ -4,4 +4,4 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
jdbcDependency 'org.postgresql:postgresql:42.2.2'
jdbcDependency 'org.postgresql:postgresql:42.2.16'

View File

@ -8,10 +8,9 @@
hibernate.dialect org.hibernate.spatial.dialect.postgis.PostgisPG95Dialect
hibernate.connection.driver_class org.postgresql.Driver
hibernate.connection.url jdbc:postgresql://localhost:9432/
hibernate.connection.username hibern8
hibernate.connection.password hibern8
hibernate.connection.url jdbc:postgresql://localhost/hibernate_orm_test
hibernate.connection.username hibernate_orm_test
hibernate.connection.password hibernate_orm_test
hibernate.show_sql true
hibernate.format_sql true

View File

@ -25,7 +25,7 @@ dependencies {
testCompile(libraries.junit)
testCompile(project(':hibernate-testing'))
testCompile([group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4'])
testCompile([group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.8.0'])
testCompile(libraries.validation)
testCompile(libraries.jandex)
testCompile(libraries.classmate)

View File

@ -29,7 +29,8 @@ import org.hibernate.spatial.HSMessageLogger;
import org.jboss.logging.Logger;
import org.apache.commons.dbcp.BasicDataSource;
import org.apache.commons.dbcp2.BasicDataSource;
import org.geolatte.geom.Geometry;
import org.geolatte.geom.codec.Wkt;
import org.geolatte.geom.codec.WktDecodeException;