Skip to content

Stop using ephemeral ports for integration tests#2299

Merged
openshift-bot merged 1 commit intoopenshift:masterfrom
liggitt:test_flake
May 18, 2015
Merged

Stop using ephemeral ports for integration tests#2299
openshift-bot merged 1 commit intoopenshift:masterfrom
liggitt:test_flake

Conversation

@liggitt
Copy link
Contributor

@liggitt liggitt commented May 17, 2015

We shouldn't use ephemeral ports for integration tests, because a free port can be taken by an outgoing request before we get a chance to start a listener on the port.

Also, we should indicate the range we want a port from so we can make sure the same port doesn't get chosen for master and dns, etc.

Fixes #1674

@smarterclayton
Copy link
Contributor

Fixes #1674

@liggitt liggitt changed the title Determine all free ports needed for integration at once Determine all free bind addresses needed for integration at once May 17, 2015
@liggitt
Copy link
Contributor Author

liggitt commented May 17, 2015

Hrmm... not the only issue, apparently:

masterAddr: "127.0.0.1:60666"
dnsAddr: "127.0.0.1:60568"
...
I0517 03:15:44.012282   13419 net.go:39] Got error &net.OpError{Op:"dial", Net:"tcp", Addr:(*net.TCPAddr)(0xc2093f1110), Err:0x6f}, trying again: "127.0.0.1:60666"
F0517 03:15:44.029771   13419 master.go:516] listen tcp 127.0.0.1:60666: bind: address already in use

@smarterclayton
Copy link
Contributor

Awesome. Probably uses that port for free outgoing or something.

On May 17, 2015, at 12:08 AM, Jordan Liggitt notifications@github.com wrote:

Hrmm... not the only issue, apparently:

masterAddr: "127.0.0.1:60666"
dnsAddr: "127.0.0.1:60568"
...
I0517 03:15:44.012282 13419 net.go:39] Got error &net.OpError{Op:"dial", Net:"tcp", Addr:(*net.TCPAddr)(0xc2093f1110), Err:0x6f}, trying again: "127.0.0.1:60666"
F0517 03:15:44.029771 13419 master.go:516] listen tcp 127.0.0.1:60666: bind: address already in use

Reply to this email directly or view it on GitHub.

@smarterclayton
Copy link
Contributor

two options:

  1. Pass a listener in
  2. Don't rely on the OS to pick a free port like this, instead search ourselves in a lower range

@liggitt
Copy link
Contributor Author

liggitt commented May 17, 2015

I'd rather search ourselves in a lower range. Will update tomorrow

@liggitt liggitt changed the title Determine all free bind addresses needed for integration at once Stop using ephemeral ports for integration tests May 18, 2015
@liggitt
Copy link
Contributor Author

liggitt commented May 18, 2015

[test]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/2245/)

@smarterclayton
Copy link
Contributor

LGTM [merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/1988/) (Image: devenv-fedora_1562)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 54a895b

openshift-bot pushed a commit that referenced this pull request May 18, 2015
@openshift-bot openshift-bot merged commit db1e134 into openshift:master May 18, 2015
@liggitt liggitt deleted the test_flake branch May 19, 2015 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"address already in use" integration test flake

3 participants