HDDS-2045. Partially started compose cluster left running

Closes #1358
This commit is contained in:
Doroszlai, Attila 2019-08-29 09:46:50 +02:00 committed by Márton Elek
parent 371c9eb6a6
commit c749f62470
No known key found for this signature in database
GPG Key ID: D51EA8F00EE79B28
1 changed files with 8 additions and 3 deletions

View File

@ -82,9 +82,14 @@ start_docker_env(){
local -i datanode_count=${1:-3}
docker-compose -f "$COMPOSE_FILE" down
docker-compose -f "$COMPOSE_FILE" up -d --scale datanode="${datanode_count}"
wait_for_datanodes "$COMPOSE_FILE" "${datanode_count}"
sleep 10
docker-compose -f "$COMPOSE_FILE" up -d --scale datanode="${datanode_count}" \
&& wait_for_datanodes "$COMPOSE_FILE" "${datanode_count}" \
&& sleep 10
if [[ $? -gt 0 ]]; then
docker-compose -f "$COMPOSE_FILE" down
return 1
fi
}
## @description Execute robot tests in a specific container.