summaryrefslogtreecommitdiff
path: root/qa/qa/page/base.rb
diff options
context:
space:
mode:
authorSanad Liaquat <sliaquat@gitlab.com>2019-07-08 15:48:33 +0500
committerSanad Liaquat <sliaquat@gitlab.com>2019-07-09 10:26:32 +0500
commite16f224ee9628e91425c6fa9bb19bfaeb5aa1af0 (patch)
treed54451193b32e7a03f7187dae06e60a74a56dd20 /qa/qa/page/base.rb
parentbf172b115c206cb6ed6c2b271fad600f1548b43c (diff)
downloadgitlab-ce-e16f224ee9628e91425c6fa9bb19bfaeb5aa1af0.tar.gz
Retry sign out if unsuccessful
Also extract retry_until into qa/qa/support/retrier.rb
Diffstat (limited to 'qa/qa/page/base.rb')
-rw-r--r--qa/qa/page/base.rb15
1 files changed, 3 insertions, 12 deletions
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb
index d0fe2987b0a..130e5e33ab4 100644
--- a/qa/qa/page/base.rb
+++ b/qa/qa/page/base.rb
@@ -25,19 +25,10 @@ module QA
end
end
- def retry_until(max_attempts: 3, reload: false)
- attempts = 0
-
- while attempts < max_attempts
- result = yield
- return result if result
-
- refresh if reload
-
- attempts += 1
+ def retry_until(max_attempts: 3, reload: false, sleep_interval: 0)
+ QA::Support::Retrier.retry_until(max_attempts: max_attempts, reload: reload, sleep_interval: sleep_interval) do
+ yield
end
-
- false
end
def retry_on_exception(max_attempts: 3, reload: false, sleep_interval: 0.5)