Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve detection of crashes and hangs with WebDriver.
This makes crash report work with WebKitWebDriver: * When the WebKitWebProcess crashes, WebKitWebDriver will raise an InvalidSessionIdException <https://webkit.org/b/207565> like the Chrome WebDriver does. So we make WebDriverProtocol::is_alive() check for that exception. It also fixes detecting when the WebDriver has hanged: * The call to is_alive() can hang if WebDriver itself has hanged or its unresponsive. If this call takes more than 5 seconds then the external timeout from the testrunner will be fired and testrunner will force a termination of the test marking it as external-timeout instead of crash. * The current logic tried to mark the test as crashing if socket timeout fired, but that timeout value was much higher than the grace period of 5 seconds, so this didn't worked. * We modify the socket timeout to 2 seconds, which should be more than enough to check if the WebDriver its still alive and allows to complete the check during the testrunner 5 seconds of extra_timeout.
- Loading branch information