diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 13:26:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-13 13:26:31 +0000 |
commit | b7dfe2ae4054aa40e15182fd3c6cb7dd39f131db (patch) | |
tree | 5ab080ca9cadeb6cd9578bf301e4e9e8810bed9e /qa/qa/support | |
parent | 25cb337cf12438169f1b14bc5dace8a06a7356e3 (diff) | |
download | gitlab-ce-b7dfe2ae4054aa40e15182fd3c6cb7dd39f131db.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/qa/support')
-rw-r--r-- | qa/qa/support/retrier.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qa/qa/support/retrier.rb b/qa/qa/support/retrier.rb index 720f1d17037..3b02cb4855b 100644 --- a/qa/qa/support/retrier.rb +++ b/qa/qa/support/retrier.rb @@ -24,7 +24,7 @@ module QA end end - def retry_until(max_attempts: 3, reload_page: nil, sleep_interval: 0) + def retry_until(max_attempts: 3, reload_page: nil, sleep_interval: 0, exit_on_failure: false) QA::Runtime::Logger.debug("with retry_until: max_attempts #{max_attempts}; sleep_interval #{sleep_interval}; reload_page:#{reload_page}") attempts = 0 @@ -40,6 +40,11 @@ module QA attempts += 1 end + if exit_on_failure + QA::Runtime::Logger.debug("Raising exception after #{max_attempts} attempts") + raise + end + false end end |