From 3619ce044a348308d7189377bcdb0ab7998432a2 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 16 Mar 2017 14:18:00 +0100 Subject: Resolve GitLab QA cold boot problems on entry page --- qa/qa/page/main/entry.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'qa') diff --git a/qa/qa/page/main/entry.rb b/qa/qa/page/main/entry.rb index fe80deb6429..c5432f83593 100644 --- a/qa/qa/page/main/entry.rb +++ b/qa/qa/page/main/entry.rb @@ -1,3 +1,5 @@ +require 'timeout' + module QA module Page module Main @@ -5,8 +7,15 @@ module QA def initialize visit('/') - # This resolves cold boot problems with login page - find('.application', wait: 120) + # This resolves cold boot / post-deployment migrations running + # problems. + # + Timeout.timeout(240) do + loop do + break if page.has_css?('.application', wait: 10) + refresh + end + end end def sign_in_using_credentials -- cgit v1.2.1 From cc887599990148cfd7db12353ed852723f63cafb Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 17 Mar 2017 11:00:27 +0100 Subject: Do not use Ruby Timeout module in GitLab QA --- qa/qa/page/main/entry.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'qa') 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 -- cgit v1.2.1