HHH-15971 Fix Oracle CI build for 11g version

This commit is contained in:
LLEFEVRE 2023-01-04 11:15:43 +01:00 committed by Christian Beikov
parent a3038f94fa
commit 2ed4d2c87b
3 changed files with 37 additions and 19 deletions

View File

@ -18,9 +18,12 @@ elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_10" ]; then
goal="-Pdb=pgsql_ci" goal="-Pdb=pgsql_ci"
elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_10" ]; then elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_10" ]; then
goal="-Pdb=edb_ci -DdbHost=localhost:5444" goal="-Pdb=edb_ci -DdbHost=localhost:5444"
elif [ "$RDBMS" == "oracle" ] || [ "$RDBMS" == "oracle_11_2" ]; then elif [ "$RDBMS" == "oracle" ]; then
# I have no idea why, but these tests don't seem to work on CI... # I have no idea why, but these tests don't seem to work on CI...
goal="-Pdb=oracle_ci -PexcludeTests=**.LockTest.testQueryTimeout*" goal="-Pdb=oracle_ci -PexcludeTests=**.LockTest.testQueryTimeout*"
elif [ "$RDBMS" == "oracle_11_2" ]; then
# I have no idea why, but these tests don't seem to work on CI...
goal="-Pdb=oracle_legacy_ci -PexcludeTests=**.LockTest.testQueryTimeout*"
elif [ "$RDBMS" == "db2" ]; then elif [ "$RDBMS" == "db2" ]; then
goal="-Pdb=db2_ci" goal="-Pdb=db2_ci"
elif [ "$RDBMS" == "db2_10_5" ]; then elif [ "$RDBMS" == "db2_10_5" ]; then

View File

@ -522,7 +522,7 @@ oracle_setup_old() {
done done
# We increase file sizes to avoid online resizes as that requires lots of CPU which is restricted in XE # We increase file sizes to avoid online resizes as that requires lots of CPU which is restricted in XE
$CONTAINER_CLI exec oracle bash -c "source /home/oracle/.bashrc; bash -c \" $CONTAINER_CLI exec oracle bash -c "source /home/oracle/.bashrc; bash -c \"
cat <<EOF | \$ORACLE_HOME/bin/sqlplus sys/Oracle18@localhost/XE as sysdba cat <<EOF | \$ORACLE_HOME/bin/sqlplus / as sysdba
alter database tempfile '\$ORACLE_BASE/oradata/XE/temp.dbf' resize 400M; alter database tempfile '\$ORACLE_BASE/oradata/XE/temp.dbf' resize 400M;
alter database datafile '\$ORACLE_BASE/oradata/XE/system.dbf' resize 1000M; alter database datafile '\$ORACLE_BASE/oradata/XE/system.dbf' resize 1000M;
alter database datafile '\$ORACLE_BASE/oradata/XE/sysaux.dbf' resize 700M; alter database datafile '\$ORACLE_BASE/oradata/XE/sysaux.dbf' resize 700M;
@ -539,29 +539,35 @@ alter system checkpoint;
alter database drop logfile group 1; alter database drop logfile group 1;
alter database drop logfile group 2; alter database drop logfile group 2;
alter system set open_cursors=1000 sid='*' scope=both; alter system set open_cursors=1000 sid='*' scope=both;
alter system set session_cached_cursors=500 sid='*' scope=spfile;
alter system set recyclebin=OFF sid='*' SCOPE=spfile;
alter system set processes=150 scope=spfile; alter system set processes=150 scope=spfile;
alter system set filesystemio_options=asynch scope=spfile; alter system set filesystemio_options=asynch scope=spfile;
alter system set disk_asynch_io=true scope=spfile; alter system set disk_asynch_io=true scope=spfile;
shutdown immediate;
startup;
create user hibernate_orm_test identified by hibernate_orm_test quota unlimited on users; create user hibernate_orm_test identified by hibernate_orm_test quota unlimited on users;
grant all privileges to hibernate_orm_test; grant all privileges to hibernate_orm_test;
EOF\"" EOF\""
echo "Waiting for Oracle to restart after configuration..." # echo "Waiting for Oracle to restart after configuration..."
$CONTAINER_CLI stop oracle # $CONTAINER_CLI stop oracle
$CONTAINER_CLI start oracle # $CONTAINER_CLI start oracle
HEALTHSTATUS= # HEALTHSTATUS=
until [ "$HEALTHSTATUS" == "healthy" ]; # until [ "$HEALTHSTATUS" == "healthy" ];
do # do
echo "Waiting for Oracle to start..." # echo "Waiting for Oracle to start..."
sleep 5; # sleep 5;
# On WSL, health-checks intervals don't work for Podman, so run them manually # # On WSL, health-checks intervals don't work for Podman, so run them manually
if command -v podman > /dev/null; then # if command -v podman > /dev/null; then
$CONTAINER_CLI healthcheck run oracle > /dev/null # $CONTAINER_CLI healthcheck run oracle > /dev/null
fi # fi
HEALTHSTATUS="`$CONTAINER_CLI inspect -f $HEALTCHECK_PATH oracle`" # HEALTHSTATUS="`$CONTAINER_CLI inspect -f $HEALTCHECK_PATH oracle`"
HEALTHSTATUS=${HEALTHSTATUS##+( )} #Remove longest matching series of spaces from the front # HEALTHSTATUS=${HEALTHSTATUS##+( )} #Remove longest matching series of spaces from the front
HEALTHSTATUS=${HEALTHSTATUS%%+( )} #Remove longest matching series of spaces from the back # HEALTHSTATUS=${HEALTHSTATUS%%+( )} #Remove longest matching series of spaces from the back
done # done
sleep 2; # sleep 2;
echo "Oracle successfully started" echo "Oracle successfully started"
} }

View File

@ -137,6 +137,15 @@ ext {
'jdbc.url' : 'jdbc:oracle:thin:@' + dbHost + ':1521/xepdb1', 'jdbc.url' : 'jdbc:oracle:thin:@' + dbHost + ':1521/xepdb1',
'connection.init_sql' : '' 'connection.init_sql' : ''
], ],
oracle_legacy_ci : [
'db.dialect' : 'org.hibernate.dialect.OracleDialect',
'jdbc.driver': 'oracle.jdbc.OracleDriver',
'jdbc.user' : 'hibernate_orm_test',
'jdbc.pass' : 'hibernate_orm_test',
// For 11 version that doesn't have any XEPDB1 database service
'jdbc.url' : 'jdbc:oracle:thin:@' + dbHost + ':1521:XE',
'connection.init_sql' : ''
],
oracle_cloud_autonomous_tls : [ oracle_cloud_autonomous_tls : [
'db.dialect' : 'org.hibernate.dialect.OracleDialect', 'db.dialect' : 'org.hibernate.dialect.OracleDialect',
'jdbc.driver': 'oracle.jdbc.OracleDriver', 'jdbc.driver': 'oracle.jdbc.OracleDriver',