Make it possible to run with informix

This commit is contained in:
Christian Beikov 2024-06-07 14:51:13 +02:00
parent e8bd4e7cc5
commit 3b6c1bc7d6
6 changed files with 61 additions and 2 deletions

View File

@ -76,6 +76,8 @@ elif [ "$RDBMS" == "cockroachdb" ]; then
goal="-Pdb=cockroachdb"
elif [ "$RDBMS" == "altibase" ]; then
goal="-Pdb=altibase"
elif [ "$RDBMS" == "informix" ]; then
goal="-Pdb=informix"
fi
# Only run checkstyle in the H2 build,

View File

@ -32,4 +32,6 @@ elif [ "$RDBMS" == 'cockroachdb' ]; then
bash $DIR/../docker_db.sh cockroachdb
elif [ "$RDBMS" == 'hana' ]; then
bash $DIR/../docker_db.sh hana
elif [ "$RDBMS" == 'informix' ]; then
bash $DIR/../docker_db.sh informix
fi

View File

@ -946,6 +946,58 @@ tidb_5_4() {
fi
}
informix() {
informix_14_10
}
informix_14_10() {
$PRIVILEGED_CLI $CONTAINER_CLI rm -f informix || true
$PRIVILEGED_CLI $CONTAINER_CLI run --name informix --privileged -p 9088:9088 -e LICENSE=accept -d icr.io/informix/informix-developer-database:14.10.FC9W1DE
echo "Starting Informix. This can take a few minutes"
# Give the container some time to start
OUTPUT=
n=0
until [ "$n" -ge 10 ]
do
OUTPUT=$($CONTAINER_CLI logs informix 2>&1)
if [[ $OUTPUT == *"Server Started"* ]]; then
break;
fi
n=$((n+1))
echo "Waiting for Informix to start..."
sleep 30
done
if [ "$n" -ge 5 ]; then
echo "Informix failed to start and configure after 5 minutes"
else
echo "Informix successfully started"
fi
}
informix_12_10() {
$PRIVILEGED_CLI $CONTAINER_CLI rm -f informix || true
$PRIVILEGED_CLI $CONTAINER_CLI run --name informix --privileged -p 9088:9088 -e LICENSE=accept -d ibmcom/informix-developer-database:12.10.FC12W1DE
echo "Starting Informix. This can take a few minutes"
# Give the container some time to start
OUTPUT=
n=0
until [ "$n" -ge 10 ]
do
OUTPUT=$($CONTAINER_CLI logs informix 2>&1)
if [[ $OUTPUT == *"login Information"* ]]; then
break;
fi
n=$((n+1))
echo "Waiting for Informix to start..."
sleep 30
done
if [ "$n" -ge 5 ]; then
echo "Informix failed to start and configure after 5 minutes"
else
echo "Informix successfully started"
fi
}
if [ -z ${1} ]; then
echo "No db name provided"
echo "Provide one of:"

View File

@ -291,7 +291,7 @@ ext {
'connection.init_sql' : ''
],
informix : [
'db.dialect' : 'org.hibernate.dialect.InformixDialect',
'db.dialect' : 'org.hibernate.community.dialect.InformixDialect',
'jdbc.driver': 'com.informix.jdbc.IfxDriver',
'jdbc.user' : 'informix',
'jdbc.pass' : 'in4mix',

View File

@ -131,6 +131,9 @@ dependencies {
else if ( db.startsWith( 'altibase' ) ) {
testRuntimeOnly dbLibs.altibase
}
else if ( db.startsWith( 'informix' ) ) {
testRuntimeOnly dbLibs.informix
}
annotationProcessor libs.loggingProcessor
annotationProcessor libs.logging

View File

@ -231,7 +231,7 @@ dependencyResolutionManagement {
def hanaVersion = version "hana", "2.19.11"
def h2gisVersion = version "h2gis", overrideableVersion( "gradle.libs.versions.h2gis", "2.2.0" )
def hsqldbVersion = version "hsqldb", overrideableVersion( "gradle.libs.versions.hsqldb", "2.7.2" )
def informixVersion = version "informix", "4.10.12"
def informixVersion = version "informix", "4.50.10.1"
def mariadbVersion = version "mariadb", "3.3.1"
def mssqlVersion = version "mssql", "12.4.2.jre11"
def mysqlVersion = version "mysql", "8.2.0"