diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-11 18:51:58 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-11 18:51:58 +0100 |
commit | fe9215adf67860772a7ae4570060905faa8af7b8 (patch) | |
tree | 6d4782fd7f41b3157fdf785636fbf3aaddde053b | |
parent | e3a67d0505f422423e15179388ae3dd70e5609f5 (diff) | |
parent | 6b635044a721c5ccf63a6e20165ed7d775fafaa2 (diff) | |
download | nextcloud-server-fe9215adf67860772a7ae4570060905faa8af7b8.tar.gz nextcloud-server-fe9215adf67860772a7ae4570060905faa8af7b8.zip |
Merge pull request #22314 from owncloud/fix-mariadb-autotest
Wait until mariadb is up and running
-rwxr-xr-x | autotest.sh | 10 | ||||
-rw-r--r-- | tests/docker/mariadb/oc.cnf | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/autotest.sh b/autotest.sh index 5196d5c31d5..48b73283499 100755 --- a/autotest.sh +++ b/autotest.sh @@ -185,17 +185,19 @@ function execute_tests { if [ ! -z "$USEDOCKER" ] ; then echo "Fire up the mariadb docker" DOCKER_CONTAINER_ID=$(docker run \ + -v $BASEDIR/tests/docker/mariadb:/etc/mysql/conf.d \ -e MYSQL_ROOT_PASSWORD=owncloud \ -e MYSQL_USER="$DATABASEUSER" \ -e MYSQL_PASSWORD=owncloud \ -e MYSQL_DATABASE="$DATABASENAME" \ - -d rullzer/mariadb-owncloud) + -d mariadb) DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID") echo "Waiting for MariaDB initialisation ..." - - # grep exits on the first match and then the script continues - timeout 30 docker logs -f $DOCKER_CONTAINER_ID 2>&1 | grep -q "mysqld: ready for connections." + if ! apps/files_external/tests/env/wait-for-connection $DATABASEHOST 3306 60; then + echo "[ERROR] Waited 60 seconds, no response" >&2 + exit 1 + fi echo "MariaDB is up." diff --git a/tests/docker/mariadb/oc.cnf b/tests/docker/mariadb/oc.cnf new file mode 100644 index 00000000000..590284d4617 --- /dev/null +++ b/tests/docker/mariadb/oc.cnf @@ -0,0 +1,5 @@ + +[mysqld] + +innodb_buffer_pool_size = 512M +innodb_flush_log_at_trx_commit = 2 |