I finally looked a bit at mediawiki selenium gem code. I noticed a few jobs failing because of a timeout issue and it ends up being queries done to saucelabs.com
Relevant code:
lib/mediawiki_selenium/support/env.rb
def sauce_api(json)
RestClient::Request.execute(
:method => :put, :url => "https://saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{$session_id}", :user => ENV["SAUCE_ONDEMAND_USERNAME"], :password => ENV["SAUCE_ONDEMAND_ACCESS_KEY"], :headers => {:content_type => "application/json"}, :payload => json
)
end
Since we often have timeout with sauce labs, I would catch the RestClient::RequestTimeout exception and retry the connection once.
Note RestClient::Request supports different timeout ( https://github.com/rest-client/rest-client/blob/master/lib/restclient/request.rb#L7 ):
:timeout and :open_timeout are how long to wait for a response and to
- open a connection, in seconds. Pass nil to disable the timeout.
I am not sure what are the defaults for Net::HTTP.
Version: wmf-deployment
Severity: normal