Closed
Description
Meta -
OS: OSX 10.12 Sierre
Selenium Version: 3.0.1 java standalone server, 3.0.0.beta2 javascript client binding
Browser: Safari 10.0 (12602.1.50.0.10)
Expected Behavior -
I thought insideBrowserTimeout matches browserTimeout, and clientGoneTimeout matches timeout in the hub and node configuration parameters.
- If browserTimeout and timeout is configured in the selenium hubConfig.json file, Selenium node should pick up those values, and so are insideBrowserTimeout and clientGoneTimeout.
- In selenium nodeConfig.json file, I set browserTimeout: 60000, timeout: 120000, the values are in milliseconds according to documentation. SessionCleaner should pick up these values
- If the testing running inside browser finishes but not calling webdriver.quit(), the clientGoneTimeout should be triggered, session is destroyed and the browser instance is free to be used again
Actual Behavior -
- From hub grid console, I can see the selenium node configuration has browserTimeout and timeout value set correctly from the hub configuration, but according to node.log, SessionCleaner still uses default insideBrowserTimeout (0) and clientGoneTimeout (1800000)
- According to node.log, SessionCleaner uses insideBrowserTimeout 60000000 and clientGoneTimeout 120000000. Somehow times 1000 on the milliseconds again.
- Session is destroyed after clientGoneTimeout expires. However, the hub doesn't seem to be notified of this event, so from the hub console, that browser instance is grey out and cannot be used.
Steps to reproduce -
- Start hub with following command
java -jar selenium-server-standalone-3.0.1.jar -role hub -log hub.log -port 4444 -host <ip> -hubConfig hubConfig.json
, and hubConfig.json:
{ "browserTimeout": 60000, "timeout": 120000 }
- Start node with following command
java -jar selenium-server-standalone-3.0.1.jar -role node -log node.log -hub $HUB_URL -nodeConfig nodeConfig.json
, and nodeConfig.json:
{ "capabilities": [ { "browserName":"safari", "maxInstances":1, "platform":"MAC", "version":"10", "seleniumProtocol": "WebDriver" } ], "debug": false, "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "register": true, "registerCycle": 5000, "maxSession":6, "port":"7777" }
- check node.log and you will see the following lines:
11:40:18.427 INFO - SessionCleaner initialized with insideBrowserTimeout 0 and clientGoneTimeout 1800000 polling every 180000
- add the following properties to nodeConfig.json and restart selenium node
"browserTimeout": 60000, "timeout": 120000
- check node.log and you will see the following lines:
11:45:57.387 INFO - SessionCleaner initialized with insideBrowserTimeout 60000000 and clientGoneTimeout 60000000 polling every 6000000"
- change browserTimeout and timeout in nodeConfig.json to the following and restart selenium node
"browserTimeout": 60, "timeout": 120"
- check node.log and you will see the following lines:
11:52:21.122 INFO - SessionCleaner initialized with insideBrowserTimeout 60000 and clientGoneTimeout 120000 polling every 6000
- Run a QUnit test but don't call webdriver.quit() when test finishes
- After 120 seconds, browser is shutdown as expected due to client timeout and the following log can be seen in node.log:
11:56:15.237 INFO - Session 4e364367-9f6e-43fc-8591-ad27c82506c9 deleted due to client timeout
.
However, the hub doesn't seem to be aware of the session being deleted. From the hub console page, that instance remains grey out and cannot be used.