This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 56d7f53 [FLINK-16750][e2e] Always copy and show the logs when yarn
e2e tests failed
56d7f53 is described below
commit 56d7f5307420558bff520919236565b92a8b9ce7
Author: wangyang0918 <[email protected]>
AuthorDate: Mon Apr 13 20:19:38 2020 +0800
[FLINK-16750][e2e] Always copy and show the logs when yarn e2e tests failed
This closes #11746.
---
flink-end-to-end-tests/test-scripts/common_utils.sh | 2 ++
flink-end-to-end-tests/test-scripts/common_yarn_docker.sh | 3 +++
flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh | 2 --
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/flink-end-to-end-tests/test-scripts/common_utils.sh
b/flink-end-to-end-tests/test-scripts/common_utils.sh
index f0653ba..01bc689 100644
--- a/flink-end-to-end-tests/test-scripts/common_utils.sh
+++ b/flink-end-to-end-tests/test-scripts/common_utils.sh
@@ -22,6 +22,8 @@
_on_exit_commands=()
function _on_exit_callback {
+ # Export the exit code so that it could be used by the callback commands
+ export TRAPPED_EXIT_CODE=$?
# Un-register the callback, to avoid multiple invocations: some shells may
treat some signals as subset of others.
trap "" INT EXIT
# Fast exit, if there is another keyboard interrupt.
diff --git a/flink-end-to-end-tests/test-scripts/common_yarn_docker.sh
b/flink-end-to-end-tests/test-scripts/common_yarn_docker.sh
index 3d245de..bcdff3e 100755
--- a/flink-end-to-end-tests/test-scripts/common_yarn_docker.sh
+++ b/flink-end-to-end-tests/test-scripts/common_yarn_docker.sh
@@ -38,6 +38,9 @@ start_time=$(date +%s)
# make sure we stop our cluster at the end
function cluster_shutdown {
+ if [ $TRAPPED_EXIT_CODE != 0 ];then
+ debug_copy_and_show_logs
+ fi
docker-compose -f
$END_TO_END_DIR/test-scripts/docker-hadoop-secure-cluster/docker-compose.yml
down
rm $FLINK_TARBALL_DIR/$FLINK_TARBALL
}
diff --git a/flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh
b/flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh
index 0c5fe91..a86860f 100755
--- a/flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh
+++ b/flink-end-to-end-tests/test-scripts/test_yarn_kerberos_docker.sh
@@ -57,14 +57,12 @@ then
echo "$OUTPUT"
else
echo "Running the job failed."
- debug_copy_and_show_logs
exit 1
fi
for expected_result in ${EXPECTED_RESULT_LOG_CONTAINS[@]}; do
if [[ ! "$OUTPUT" =~ $expected_result ]]; then
echo "Output does not contain '$expected_result' as required"
- debug_copy_and_show_logs
exit 1
fi
done