Skip to content
Snippets Groups Projects
Commit 5470d0ed authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Connect to database to verify if it is running

Try to connect to the OCI host via sqlplus to ensure that the connection is already running. Required by the new OCI configuration on CI.
parent 08ae1e81
No related branches found
No related tags found
No related merge requests found
......@@ -203,8 +203,14 @@ function execute_tests {
echo "Waiting for Oracle initialization ... "
# grep exits on the first match and then the script continues - times out after 2 minutes
timeout 240 docker logs -f "$DOCKER_CONTAINER_ID" 2>&1 | grep -q "Grant succeeded."
# Try to connect to the OCI host via sqlplus to ensure that the connection is already running
for i in {1..48}
do
if sqlplus "system/oracle@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=$DATABASEHOST)(Port=1521))(CONNECT_DATA=(SID=XE)))" < /dev/null | grep 'Connected to'; then
break;
fi
sleep 5
done
DATABASEUSER=autotest
DATABASENAME='XE'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment