I have a set of parallel tests which never have this problem when I run them locally. This only occurs on my piddly little two node grid. My tests are pretty consistently crapping out when I am trying to invoke WebDriver.getCurrentUrl()
. The error message is this:
org.openqa.selenium.WebDriverException: Session [035e8f79-fdd7-4492-a565-f803df792d3c] was terminated due to TIMEOUT
Command duration or timeout: 90 milliseconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'bos-mpky6', ip: '172.30.31.59', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_102'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=46.0.1, platform=LINUX, nativeEvents=false, acceptSslCerts=true, webdriver.remote.sessionid=035e8f79-fdd7-4492-a565-f803df792d3c, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 035e8f79-fdd7-4492-a565-f803df792d3c
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:701)
at org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl(RemoteWebDriver.java:326)
At first, I thought this was a configuration problem, but I have configured my setup to have a a timeout much longer than a few milliseconds. Here is the configuration I use for the hub:
{
"host": null,
"port": 4444,
"newSessionWaitTimeout": -1,
"servlets" : [],
"prioritizer": null,
"capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
"throwOnCapabilityNotPresent": true,
"nodePolling": 5000,
"cleanUpCycle": 5000,
"timeout": 300000,
"browserTimeout": 0,
"jettyMaxThreads":-1
}
Here is the configuration I am using for both my nodes:
{
"capabilities":
[
{
"browserName": "firefox",
"version": "46.0.1",
"platform": "LINUX",
"maxInstances": 5
}
],
"configuration":
{
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"nodeTimeout":500000,
"port":5555,
"nodePolling":2000,
"registerCycle":10000,
"register":true,
"cleanUpCycle":2000,
"timeout":500000
}
}
I am not using Docker or anything like that. I have tried versions 2.53.1, 2.53.0, 2.52.0 and 2.51.0 of the grid server and the problem continues to plague my tests. Is there something I can do to get rid of this problem? I can't find a configuration setting related to timeouts that seems to get rid of this.