Selenium tests timeouting after 45 secs of trying to bind to locking port
app/workbench/test/integration_helper.rb file is used to get a random available port for different services used in the integration tests.
In the case of Selenium, it also tries to use the port number before the one returned by this function, for locking purposes.
It seems that when this locking port is being used by some other process, every selenium test wait for 45 seconds before getting a timeout, and as a result the overall testing time goes up really fast.
Here's an example of the error message:
Error: WebsocketTest#test_test_live_logging_scrolling_container_requests: Selenium::WebDriver::Error::WebDriverError: unable to bind to locking port 33354 within 45 seconds test/integration_helper.rb:183:in `screenshot' test/integration_helper.rb:194:in `block in <class:IntegrationTest>' test/test_helper.rb:307:in `after_teardown' test/test_helper.rb:297:in `run'
As an additional data point, I noticed that not all selenium tests gave this error, so maybe the problem has to do with the subject discussed here: http://stackoverflow.com/a/33483845
Updated by Nico César over 6 years ago
What if a user is running this and port happens to be 1024
locking_port will be 1023 (which only root can allocate). Will that be a Errno::EADDRINUSE too? or something like Errno::EACCES or Errno::EINVAL