From d3f45f0e0eb52250d444edf6f94eb048f8b410c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 12 Jul 2017 08:45:49 +0300 Subject: [PATCH] MXS-1300: Speed up REST API testing The MariaDB servers are now started first. This will give them time to prepare while other parts of the tests are being prepared. --- maxctrl/test/docker-compose.yml | 6 ------ maxctrl/test/test_rest_api.sh | 8 +++++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/maxctrl/test/docker-compose.yml b/maxctrl/test/docker-compose.yml index 7958901f0..d4d4ac410 100644 --- a/maxctrl/test/docker-compose.yml +++ b/maxctrl/test/docker-compose.yml @@ -12,8 +12,6 @@ services: server2: image: mariadb:10.1 network_mode: "host" - depends_on: - - server1 environment: MYSQL_ALLOW_EMPTY_PASSWORD: Y volumes: @@ -23,8 +21,6 @@ services: server3: image: mariadb:10.1 network_mode: "host" - depends_on: - - server1 environment: MYSQL_ALLOW_EMPTY_PASSWORD: Y volumes: @@ -34,8 +30,6 @@ services: server4: image: mariadb:10.1 network_mode: "host" - depends_on: - - server1 environment: MYSQL_ALLOW_EMPTY_PASSWORD: Y volumes: diff --git a/maxctrl/test/test_rest_api.sh b/maxctrl/test/test_rest_api.sh index aa7ea8562..c98db21cc 100755 --- a/maxctrl/test/test_rest_api.sh +++ b/maxctrl/test/test_rest_api.sh @@ -17,6 +17,11 @@ mkdir -p $testdir && cd $testdir # Currently all tests that use npm are for the REST API cp -t $testdir -r $srcdir/maxctrl/test/* + +# Bring MariaDB servers up, this is an asynchronous process +docker-compose up -d || exit 1 + +# Install dependencies npm install mkdir -p $maxscaledir && cd $maxscaledir @@ -56,9 +61,6 @@ cd $testdir # This variable is used to start and stop MaxScale before each test export MAXSCALE_DIR=$maxscaledir -# Start MariaDB servers -docker-compose up -d - # Wait until the servers are up for node in server1 server2 server3 server4 do