https://bugzilla.wikimedia.org/show_bug.cgi?id=70179

            Bug ID: 70179
           Summary: mediawiki selenium should retry sauce labs requests on
                    timeout
           Product: Wikimedia
           Version: wmf-deployment
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Quality Assurance
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
       Web browser: ---
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to