Bug #9858
closedSelenium tests timeouting after 45 secs of trying to bind to locking port
Description
Function available_port()
at 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 Lucas Di Pentima over 8 years ago
- Subject changed from Selenium random port number N selection should check if N-1 is also available to Selenium tests timeouting after 45 secs of trying to bind to locking port
Updated by Lucas Di Pentima over 8 years ago
- Assigned To set to Lucas Di Pentima
- Target version set to 2016-09-14 sprint
- Story points set to 0.5
Updated by Lucas Di Pentima over 8 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima over 8 years ago
On the ticket's description I wrote that not all selenium tests were failing. That is incorrect as I was seeing poltergeist tests instead.
Added fix on available_port
method at 8f5ef30 .
Updated by Nico César over 8 years ago
test 8f5ef3058658c046cd25e4fff7b2f0ffafb79b77
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
Updated by Lucas Di Pentima over 8 years ago
Yes, the exception would be Errno::EACCES. Added it to the rescue clause: ef439ae
Updated by Lucas Di Pentima over 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:d5ebfb1d35d2458742c545af4ee16c9f14de08bb.