summaryrefslogtreecommitdiffstats
path: root/autotest.sh
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-09-18 19:25:59 +0200
committerLukas Reschke <lukas@owncloud.com>2015-09-18 19:43:34 +0200
commit5470d0edae11ea72a499456287fb6529a5bd1768 (patch)
tree4a3507524adfd6ca16db0d657c6bb57000bcb635 /autotest.sh
parent08ae1e8183a5600aa5e3b1663c55d48a314ed0d7 (diff)
downloadnextcloud-server-5470d0edae11ea72a499456287fb6529a5bd1768.tar.gz
nextcloud-server-5470d0edae11ea72a499456287fb6529a5bd1768.zip
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.
Diffstat (limited to 'autotest.sh')
-rwxr-xr-xautotest.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/autotest.sh b/autotest.sh
index 8d0e20cf2a8..b1b27ec8c8d 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -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'