From 93cc4019585362b5dcb3aefe6dd14a0e2108b8b2 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Wed, 15 Sep 2021 03:08:41 +0800 Subject: [PATCH] Add timeout function (#1477) Signed-off-by: Kevin Su --- end2end/execute.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/end2end/execute.sh b/end2end/execute.sh index a59c312390..edbf0577fd 100755 --- a/end2end/execute.sh +++ b/end2end/execute.sh @@ -39,13 +39,15 @@ function wait_for_flyte_deploys() { echo "Flyte deployed in $SECONDS seconds." } +function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; } + function run_flyte_examples() { echo $DIR # Launch test kubectl -n flyte create -f $DIR/tests/endtoend.yaml # Wait at most 20 minutes for things to pass - /usr/bin/timeout 1200 $DIR/test_monitor.sh + timeout 1200 $DIR/test_monitor.sh return $? }