You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/01/20 12:32:53 UTC
[GitHub] [hadoop-ozone] adoroszlai opened a new pull request #464:
HDDS-2902. execute_robot_test on unknown/unavailable container should fail
acceptance test
adoroszlai opened a new pull request #464: HDDS-2902. execute_robot_test on unknown/unavailable container should fail acceptance test
URL: https://github.com/apache/hadoop-ozone/pull/464
## What changes were proposed in this pull request?
Make acceptance test fail if the command to run tests fails. This is necessary because acceptance test result is normally determined by test result analysis (via `rebot` command). But `rebot` only encounters results for tests that were actually run, does not know about tests that failed to be run.
https://issues.apache.org/jira/browse/HDDS-2902
## How was this patch tested?
1. Temporarily added a test execution on `recon` container in `ozonesecure` environment to reproduce the problem. Since this branch does not have the fix for HDDS-2897, it should fail, but without this fix (for HDDS-2902) it actually passes despite the container being down:
```
2020-01-17T20:02:29.8256065Z No container found for recon_1
```
https://github.com/adoroszlai/hadoop-ozone/runs/395850452
2. Implemented the fix for HDDS-2902. Verified that it makes acceptance test fail at the right point:
```
2020-01-20T09:41:34.9813929Z No container found for recon_1
2020-01-20T09:41:35.5724622Z Error: No such container:path: ozonesecure_recon_1:/tmp/smoketest/ozonesecure/result/robot-ozonesecure-ozonesecure-basic-recon.xml
2020-01-20T09:41:37.8846612Z Stopping ozonesecure_kdc_1 ... done
...
2020-01-20T09:41:39.4007426Z Removing ozonesecure_s3g_1 ... done
2020-01-20T09:41:39.4007632Z Removing network ozonesecure_default
2020-01-20T09:41:39.5108890Z ERROR: Test execution of /home/runner/work/hadoop-ozone/hadoop-ozone/hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/compose/ozonesecure is FAILED!!!!
...
2020-01-20T09:41:41.0464403Z ##[error]Process completed with exit code 1.
```
https://github.com/adoroszlai/hadoop-ozone/runs/398565843
3. Reverted the "repro" change. Verified that acceptance test passes:
https://github.com/adoroszlai/hadoop-ozone/runs/398666218
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org
[GitHub] [hadoop-ozone] elek commented on a change in pull request #464:
HDDS-2902. execute_robot_test on unknown/unavailable container should fail
acceptance test
Posted by GitBox <gi...@apache.org>.
elek commented on a change in pull request #464: HDDS-2902. execute_robot_test on unknown/unavailable container should fail acceptance test
URL: https://github.com/apache/hadoop-ozone/pull/464#discussion_r369979044
##########
File path: hadoop-ozone/dist/src/main/compose/testlib.sh
##########
@@ -99,14 +99,20 @@ execute_robot_test(){
set +e
OUTPUT_NAME="$COMPOSE_ENV_NAME-$TEST_NAME-$CONTAINER"
OUTPUT_PATH="$RESULT_DIR_INSIDE/robot-$OUTPUT_NAME.xml"
- docker-compose -f "$COMPOSE_FILE" exec -T "$CONTAINER" mkdir -p "$RESULT_DIR_INSIDE"
# shellcheck disable=SC2068
- docker-compose -f "$COMPOSE_FILE" exec -T -e SECURITY_ENABLED="${SECURITY_ENABLED}" "$CONTAINER" python -m robot ${ARGUMENTS[@]} --log NONE -N "$TEST_NAME" --report NONE "${OZONE_ROBOT_OPTS[@]}" --output "$OUTPUT_PATH" "$SMOKETEST_DIR_INSIDE/$TEST"
+ docker-compose -f "$COMPOSE_FILE" exec -T "$CONTAINER" mkdir -p "$RESULT_DIR_INSIDE" \
+ && docker-compose -f "$COMPOSE_FILE" exec -T -e SECURITY_ENABLED="${SECURITY_ENABLED}" "$CONTAINER" python -m robot ${ARGUMENTS[@]} --log NONE -N "$TEST_NAME" --report NONE "${OZONE_ROBOT_OPTS[@]}" --output "$OUTPUT_PATH" "$SMOKETEST_DIR_INSIDE/$TEST"
+ local -i rc=$?
FULL_CONTAINER_NAME=$(docker-compose -f "$COMPOSE_FILE" ps | grep "_${CONTAINER}_" | head -n 1 | awk '{print $1}')
docker cp "$FULL_CONTAINER_NAME:$OUTPUT_PATH" "$RESULT_DIR/"
set -e
+ if [[ ${rc} -gt 0 ]]; then
Review comment:
Side note (independent): This is required (and the patch works) only because the `set -e` is included from `testlib.sh`
1. I don't like that it's hidden and not explicit enough
2. I like that it's forced for all `test.sh` and hard to forgot.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org
[GitHub] [hadoop-ozone] elek closed pull request #464: HDDS-2902.
execute_robot_test on unknown/unavailable container should fail acceptance
test
Posted by GitBox <gi...@apache.org>.
elek closed pull request #464: HDDS-2902. execute_robot_test on unknown/unavailable container should fail acceptance test
URL: https://github.com/apache/hadoop-ozone/pull/464
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org
[GitHub] [hadoop-ozone] adoroszlai commented on issue #464: HDDS-2902.
execute_robot_test on unknown/unavailable container should fail acceptance
test
Posted by GitBox <gi...@apache.org>.
adoroszlai commented on issue #464: HDDS-2902. execute_robot_test on unknown/unavailable container should fail acceptance test
URL: https://github.com/apache/hadoop-ozone/pull/464#issuecomment-577612300
Thanks @elek for reviewing and committing it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org