Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion flink-end-to-end-tests/test-scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,11 @@ internal_run_with_timeout() {

(
command_pid=$BASHPID
(sleep "${timeout_in_seconds}" # set a timeout for this command
(
# Kill the sleep on teardown so it doesn't keep the CI stdout pipe open until timeout.
trap 'kill $sleep_pid 2>/dev/null; exit 0' TERM
sleep "${timeout_in_seconds}" & sleep_pid=$! # set a timeout for this command
wait $sleep_pid
echo "${command_label:-"The command '${command}'"} (pid: $command_pid) did not finish after $timeout_in_seconds seconds."
eval "${on_failure}"
kill "$command_pid") & watchdog_pid=$!
Expand Down