summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanad Liaquat <sliaquat@gitlab.com>2019-06-11 06:00:49 +0000
committerSanad Liaquat <sliaquat@gitlab.com>2019-06-11 06:00:49 +0000
commitc9216d630554132a8403cf251d122f93e44f2772 (patch)
treecaeefa39c1bba4798db9f935da6de86515c94892
parent46129bc8b91639b5c40bdd1d04fabd5131030c77 (diff)
parent1dbc25e88642d0f1a6d688ff9aec2747c6c63264 (diff)
downloadgitlab-ce-c9216d630554132a8403cf251d122f93e44f2772.tar.gz
Merge branch 'qa-ml-dry-retry-on-exception' into 'master'
[CE] use `retry_on_exception` instead of duplicating code See merge request gitlab-org/gitlab-ce!29452
-rw-r--r--qa/qa/ce/strategy.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/qa/qa/ce/strategy.rb b/qa/qa/ce/strategy.rb
index 6c1820ffdc8..018a1eb1bfc 100644
--- a/qa/qa/ce/strategy.rb
+++ b/qa/qa/ce/strategy.rb
@@ -10,18 +10,11 @@ module QA
end
def perform_before_hooks
- retries ||= 0
-
# The login page could take some time to load the first time it is visited.
# We visit the login page and wait for it to properly load only once before the tests.
- QA::Runtime::Browser.visit(:gitlab, QA::Page::Main::Login)
- rescue QA::Page::Validatable::PageValidationError
- if (retries += 1) < 3
- Runtime::Logger.warn("The login page did not appear as expected. Retrying... (attempt ##{retries})")
- retry
+ QA::Support::Retrier.retry_on_exception do
+ QA::Runtime::Browser.visit(:gitlab, QA::Page::Main::Login)
end
-
- raise
end
end
end