aboutsummaryrefslogtreecommitdiffstats
path: root/autotest.sh
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-22 15:54:46 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-22 15:54:46 +0200
commit8b086156b1504c31fb93768d1dc8f413b5262c00 (patch)
tree70cb2837a9e9626a60ee1f4a9a634080605deab2 /autotest.sh
parentce359b3a8c0ee67a8d389118a6d59970bb52b068 (diff)
parent5470d0edae11ea72a499456287fb6529a5bd1768 (diff)
downloadnextcloud-server-8b086156b1504c31fb93768d1dc8f413b5262c00.tar.gz
nextcloud-server-8b086156b1504c31fb93768d1dc8f413b5262c00.zip
Merge pull request #19177 from owncloud/docker-check-state
Connect to database to verify if it is running
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 243b8df0c6a..cd36193cf6c 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'