summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-17 11:00:27 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-17 11:00:27 +0100
commitcc887599990148cfd7db12353ed852723f63cafb (patch)
treebfd9cc69bcd7f8828545ed06a0587c59b57609dd
parent3619ce044a348308d7189377bcdb0ab7998432a2 (diff)
downloadgitlab-ce-cc887599990148cfd7db12353ed852723f63cafb.tar.gz
Do not use Ruby Timeout module in GitLab QAfix/gb/gitlab-qa-start-page-cold-boot
-rw-r--r--qa/qa/page/main/entry.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/qa/qa/page/main/entry.rb b/qa/qa/page/main/entry.rb
index c5432f83593..a9810beeb29 100644
--- a/qa/qa/page/main/entry.rb
+++ b/qa/qa/page/main/entry.rb
@@ -1,5 +1,3 @@
-require 'timeout'
-
module QA
module Page
module Main
@@ -7,14 +5,13 @@ module QA
def initialize
visit('/')
- # This resolves cold boot / post-deployment migrations running
- # problems.
+ # This resolves cold boot / background tasks problems
#
- Timeout.timeout(240) do
- loop do
- break if page.has_css?('.application', wait: 10)
- refresh
- end
+ start = Time.now
+
+ while Time.now - start < 240
+ break if page.has_css?('.application', wait: 10)
+ refresh
end
end