intern
intern copied to clipboard
Add ability to retry command requests to remote browsers
Sometimes commands sent to remote browsers timeout due to transient network flakiness. (See #905.) In those cases, it would be helpful if Intern would try re-sending a command some limited number of times.
This functionality might work best in Leadfoot, or possibly in ProxiedSession. The goal would be for network sends to be transparently retried some number of times (which may or may not be initially configurable).
The frequency of timeouts when connected to BrowserStack has gotten a bit silly at this point.
A potential fix has been pushed in 7b7b110. This commit adds retry functionality for all requests made from Node. Only two classes of failures lead to retries: ETIMEDOUT (a TCP connection couldn't be established) or ECONNRESET (a connection was forcibly closed). By default, Intern will retry a request twice. The common/request.request now understands a retries option that will let this be configured on a per-request basis.
Is there any update on this fix, I am still noticing ETIMEDOUT Error on browserstack.
This is in Intern master, but hasn't yet been backported to Intern 4.x (@theintern/common, specifically).