Test stabilization: Creation of and communication to remote Selenium browser instance fails in load intense CI scenarios.
This commit is contained in:
parent
5eed9c7506
commit
f34de820ac
1 changed files with 12 additions and 0 deletions
|
@ -93,10 +93,22 @@ class TestCase < Test::Unit::TestCase
|
||||||
if ENV['BROWSER_VERSION']
|
if ENV['BROWSER_VERSION']
|
||||||
caps.version = ENV['BROWSER_VERSION']
|
caps.version = ENV['BROWSER_VERSION']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# (ironically) required for timeout checks
|
||||||
|
# https://github.com/zalando/zalenium/issues/469#issuecomment-371417340
|
||||||
|
# https://opensource.zalando.com/zalenium/#usage
|
||||||
|
caps['idleTimeout'] = 300
|
||||||
|
|
||||||
|
http_client = Selenium::WebDriver::Remote::Http::Default.new(
|
||||||
|
open_timeout: 120,
|
||||||
|
read_timeout: 120
|
||||||
|
)
|
||||||
|
|
||||||
local_browser = Selenium::WebDriver.for(
|
local_browser = Selenium::WebDriver.for(
|
||||||
:remote,
|
:remote,
|
||||||
url: ENV['REMOTE_URL'],
|
url: ENV['REMOTE_URL'],
|
||||||
desired_capabilities: caps,
|
desired_capabilities: caps,
|
||||||
|
http_client: http_client,
|
||||||
)
|
)
|
||||||
@browsers[local_browser.hash] = local_browser
|
@browsers[local_browser.hash] = local_browser
|
||||||
browser_instance_preferences(local_browser)
|
browser_instance_preferences(local_browser)
|
||||||
|
|
Loading…
Reference in a new issue