Skip to content

Commit c749f62

Browse files
adoroszlaielek
authored andcommitted
HDDS-2045. Partially started compose cluster left running
Closes #1358
1 parent 371c9eb commit c749f62

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

hadoop-ozone/dist/src/main/compose/testlib.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,14 @@ start_docker_env(){
8282
local -i datanode_count=${1:-3}
8383

8484
docker-compose -f "$COMPOSE_FILE" down
85-
docker-compose -f "$COMPOSE_FILE" up -d --scale datanode="${datanode_count}"
86-
wait_for_datanodes "$COMPOSE_FILE" "${datanode_count}"
87-
sleep 10
85+
docker-compose -f "$COMPOSE_FILE" up -d --scale datanode="${datanode_count}" \
86+
&& wait_for_datanodes "$COMPOSE_FILE" "${datanode_count}" \
87+
&& sleep 10
88+
89+
if [[ $? -gt 0 ]]; then
90+
docker-compose -f "$COMPOSE_FILE" down
91+
return 1
92+
fi
8893
}
8994

9095
## @description Execute robot tests in a specific container.

0 commit comments

Comments
 (0)