diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-09-13 21:53:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-13 21:53:07 +0200 |
commit | 630b2ff01d64fcf2c707e80d74d9ef1af1bbc7c0 (patch) | |
tree | 4c6c17fd38caf5225246548f68361e04dd009829 | |
parent | b6439da1288d629eaf07d3d6f2497f3583fd11e7 (diff) | |
parent | 11cc8903bb3a2a645bddeddc7ef45bbfe30ef99f (diff) | |
download | nextcloud-server-630b2ff01d64fcf2c707e80d74d9ef1af1bbc7c0.tar.gz nextcloud-server-630b2ff01d64fcf2c707e80d74d9ef1af1bbc7c0.zip |
Merge pull request #1400 from nextcloud/fix-mysql-racecondition
add actual check if mysql is up already
-rw-r--r-- | .drone.yml | 1 | ||||
-rwxr-xr-x | autotest.sh | 13 |
2 files changed, 5 insertions, 9 deletions
diff --git a/.drone.yml b/.drone.yml index 10c7813d3e6..4b6dd4e9142 100644 --- a/.drone.yml +++ b/.drone.yml @@ -127,7 +127,6 @@ pipeline: mysql-php5.6: image: nextcloudci/php5.6:php5.6-2 commands: - - sleep 15 # gives the database enough time to initialize - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql when: matrix: diff --git a/autotest.sh b/autotest.sh index 022d4ecd4b6..2dfa961a1a2 100755 --- a/autotest.sh +++ b/autotest.sh @@ -191,14 +191,6 @@ function execute_tests { -d mysql) DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID") - echo "Waiting for MySQL initialisation ..." - if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 3306 600; then - echo "[ERROR] Waited 600 seconds, no response" >&2 - exit 1 - fi - - echo "MySQL is up." - else if [ -z "$DRONE" ] ; then # no need to drop the DB when we are on CI if [ "mysql" != "$(mysql --version | grep -o mysql)" ] ; then @@ -211,6 +203,11 @@ function execute_tests { DATABASEHOST=127.0.0.1 fi fi + echo "Waiting for MySQL initialisation ..." + if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 3306 600; then + echo "[ERROR] Waited 600 seconds, no response" >&2 + exit 1 + fi fi if [ "$DB" == "mariadb" ] ; then if [ ! -z "$USEDOCKER" ] ; then |