Setting longer timeout for protractor to connect to selenium driver
Running my protractor tests remotely (jenkins) leads to timeout error sometimes. That is not deterministic.
The thing is that the selenium driver takes so long so start so protractor times out:
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
[launcher] Process exited with error code 1
/opt/jenkins.dir/workspace/my-jenkins-job/integration- test/ui/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1761
throw error;
^
Error: Timed out waiting for the WebDriver server at http://10.97.193.53:4455/wd/hub
at Error (<anonymous>)
at onResponse (/opt/jenkins.dir/workspace/my-jenkins-job/integration-test/ui/node_modules/protractor/node_modules/selenium-webdriver/http/util.js:87:11)
at /opt/jenkins.dir/workspace/my-jenkins-job/integration-test/ui/node_modules/protractor/node_modules/selenium-webdriver/http/util.js:42:21
at /opt/jenkins.dir/workspace/my-jenkins-job/integration-test/ui/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/http/http.js:96:5
at ClientRequest.<anonymous> (/opt/jenkins.dir/workspace/my-jenkins-job/integration-test/ui/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:145:7)
at ClientRequest.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1548:9)
at Socket.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:448:13)
However when I run the tests locally in my mac there is no problem and the tests run perfectly.
I have tried to start the selenium servers manually in the remote machines and I have realised that sometimes it works immediately and sometimes I have to wait up to one minute.
My question is: Is there any way to tell protractor to wait longer for the webdriver to connect? If not, I think it would be a good feature.
Environment details
Machine: Red Hat 4.4.7-11 Protractor version: 1.8.0 Selenium Server Standalone: 2.45.0
There are a couple timeout-related options in the reference config. Hopefully that helps!
(Closing this issue as per CONTRIBUTING.md#questions)