Fix missing error output from timeout
The exits would prevent the printing code from running
This commit is contained in:
parent
fea5adb432
commit
8e6152ff2f
|
@ -9,7 +9,7 @@ TEST_TIMEOUT_IN_SECONDS=${TEST_TIMEOUT_IN_SECONDS-60}
|
||||||
function repeat_until_success_or_timeout {
|
function repeat_until_success_or_timeout {
|
||||||
if ! [[ "$1" =~ ^[0-9]+$ ]]; then
|
if ! [[ "$1" =~ ^[0-9]+$ ]]; then
|
||||||
echo "First parameter for timeout must be an integer, recieved \"$1\""
|
echo "First parameter for timeout must be an integer, recieved \"$1\""
|
||||||
exit 1
|
return 1
|
||||||
fi
|
fi
|
||||||
TIMEOUT=$1
|
TIMEOUT=$1
|
||||||
STARTTIME=$SECONDS
|
STARTTIME=$SECONDS
|
||||||
|
@ -19,7 +19,7 @@ function repeat_until_success_or_timeout {
|
||||||
sleep 5
|
sleep 5
|
||||||
if [[ $(($SECONDS - $STARTTIME )) -gt $TIMEOUT ]]; then
|
if [[ $(($SECONDS - $STARTTIME )) -gt $TIMEOUT ]]; then
|
||||||
echo "Timed out on command: $@"
|
echo "Timed out on command: $@"
|
||||||
exit 1
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue