Project

General

Profile

Actions

Bug #9858

closed

Selenium tests timeouting after 45 secs of trying to bind to locking port

Added by Lucas Di Pentima over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Tests
Target version:
Start date:
08/25/2016
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
0.5

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


Subtasks 1 (0 open1 closed)

Task #9905: Review 9858-selenium-locking-port-bindingResolvedNico César08/25/2016

Actions
Actions #1

Updated by Lucas Di Pentima over 6 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
Actions #2

Updated by Lucas Di Pentima over 6 years ago

  • Assigned To set to Lucas Di Pentima
  • Target version set to 2016-09-14 sprint
  • Story points set to 0.5
Actions #3

Updated by Lucas Di Pentima about 6 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Lucas Di Pentima about 6 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 .

Actions #5

Updated by Nico César about 6 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

Actions #6

Updated by Lucas Di Pentima about 6 years ago

Yes, the exception would be Errno::EACCES. Added it to the rescue clause: ef439ae

Actions #7

Updated by Nico César about 6 years ago

test ef439ae

ready to merge

Actions #8

Updated by Lucas Di Pentima about 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:d5ebfb1d35d2458742c545af4ee16c9f14de08bb.

Actions

Also available in: Atom PDF