Skip to content

Commit 7174369

Browse files
adoroszlaiahussein
authored andcommitted
HDDS-2185. createmrenv failure not reflected in acceptance test result
Closes apache#1533
1 parent 25e4e7e commit 7174369

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ RESULT_DIR=${RESULT_DIR:-"$COMPOSE_DIR/result"}
2222
RESULT_DIR_INSIDE="/tmp/smoketest/$(basename "$COMPOSE_ENV_NAME")/result"
2323
SMOKETEST_DIR_INSIDE="${OZONE_DIR:-/opt/hadoop}/smoketest"
2424

25-
#delete previous results
26-
rm -rf "$RESULT_DIR"
27-
mkdir -p "$RESULT_DIR"
28-
#Should be writeable from the docker containers where user is different.
29-
chmod ogu+w "$RESULT_DIR"
25+
## @description create results directory, purging any prior data
26+
create_results_dir() {
27+
#delete previous results
28+
rm -rf "$RESULT_DIR"
29+
mkdir -p "$RESULT_DIR"
30+
#Should be writeable from the docker containers where user is different.
31+
chmod ogu+w "$RESULT_DIR"
32+
}
3033

3134
## @description print the number of datanodes up
3235
## @param the docker-compose file
@@ -81,6 +84,8 @@ wait_for_datanodes(){
8184
start_docker_env(){
8285
local -i datanode_count=${1:-3}
8386

87+
create_results_dir
88+
8489
docker-compose -f "$COMPOSE_FILE" down
8590
docker-compose -f "$COMPOSE_FILE" up -d --scale datanode="${datanode_count}" \
8691
&& wait_for_datanodes "$COMPOSE_FILE" "${datanode_count}" \

0 commit comments

Comments
 (0)