Skip to content

Commit

Permalink
[FLINK-19882][e2e] Properly forward exit code in test
Browse files Browse the repository at this point in the history
  • Loading branch information
rmetzger committed Nov 10, 2020
1 parent d00941c commit 6a2e5fc
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,10 @@ function check_logs {
# This function does a cleanup after the test. The watchdog is terminated and temporary
# files and folders are deleted.
function cleanup_after_test {
kill ${watchdog_pid} 2> /dev/null
wait ${watchdog_pid} 2> /dev/null
}

# Calls the cleanup step for this tests and exits with an error.
function cleanup_after_test_and_exit_fail {
cleanup_after_test
exit 1
kill ${watchdog_pid} 2> /dev/null || true
wait ${watchdog_pid} 2> /dev/null || true
}
on_exit cleanup_after_test

## This function executes one run for a certain configuration
function run_local_recovery_test {
Expand Down Expand Up @@ -109,7 +104,4 @@ function run_local_recovery_test {
}

## MAIN
trap cleanup_after_test_and_exit_fail EXIT
run_test_with_timeout 600 run_local_recovery_test "$@"
trap - EXIT
exit 0

0 comments on commit 6a2e5fc

Please sign in to comment.