|
@@ -77,6 +77,7 @@ wait_for_datanodes(){
|
|
|
sleep 2
|
|
|
done
|
|
|
echo "WARNING! Datanodes are not started successfully. Please check the docker-compose files"
|
|
|
+ return 1
|
|
|
}
|
|
|
|
|
|
## @description Starts a docker-compose based test environment
|
|
@@ -86,13 +87,14 @@ start_docker_env(){
|
|
|
|
|
|
create_results_dir
|
|
|
|
|
|
- docker-compose -f "$COMPOSE_FILE" down
|
|
|
- docker-compose -f "$COMPOSE_FILE" up -d --scale datanode="${datanode_count}" \
|
|
|
+ docker-compose -f "$COMPOSE_FILE" --no-ansi down
|
|
|
+ docker-compose -f "$COMPOSE_FILE" --no-ansi 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
|
|
|
+ OUTPUT_NAME="$COMPOSE_ENV_NAME"
|
|
|
+ stop_docker_env
|
|
|
return 1
|
|
|
fi
|
|
|
}
|
|
@@ -136,9 +138,9 @@ execute_command_in_container(){
|
|
|
|
|
|
## @description Stops a docker-compose based test environment (with saving the logs)
|
|
|
stop_docker_env(){
|
|
|
- docker-compose -f "$COMPOSE_FILE" logs > "$RESULT_DIR/docker-$OUTPUT_NAME.log"
|
|
|
+ docker-compose -f "$COMPOSE_FILE" --no-ansi logs > "$RESULT_DIR/docker-$OUTPUT_NAME.log"
|
|
|
if [ "${KEEP_RUNNING:-false}" = false ]; then
|
|
|
- docker-compose -f "$COMPOSE_FILE" down
|
|
|
+ docker-compose -f "$COMPOSE_FILE" --no-ansi down
|
|
|
fi
|
|
|
}
|
|
|
|