GJL commented on a change in pull request #9419: [FLINK-13599][e2e tests] Harden test_streaming_kinesis with kinesalite docker image download/run retries URL: https://github.com/apache/flink/pull/9419#discussion_r312888882
########## File path: flink-end-to-end-tests/test-scripts/common.sh ########## @@ -747,3 +747,47 @@ function retry_times() { echo "Command: ${command} failed ${retriesNumber} times." return 1 } + +################################################################################## +# Retry action until it has successfully exited and wait for condition. +# +# Globals: +# - +# Arguments: +# $1 - action to run +# $2 - boolean function to check whether the action has been successfully done +# $3 - action name for logs +# $4 - (default: 10) max number of retries to run action until passed and check done +# $5 - (default: 0) backoff delay in seconds between retry attempts +# Returns: +# Done or failed message +################################################################################### +function retry_until_passed_and_wait_condition { + local action=${@:1} + local check_done=${@:2} + local name=${3} + local max_retry="${4:-10}" + local backoff_delay="${5:-0}" + + local attempt=1 + local action_passed=1 Review comment: The name implies a boolean, which it is not. How about `action_exit_code`? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services