Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Puma::Server#connected_port #1996

Closed
2 tasks
nateberkopec opened this issue Sep 26, 2019 · 2 comments · Fixed by #2076
Closed
2 tasks

Remove Puma::Server#connected_port #1996

nateberkopec opened this issue Sep 26, 2019 · 2 comments · Fixed by #2076
Labels
Milestone

Comments

@nateberkopec
Copy link
Member

If it's only used in tests, it shouldn't be a public method.

  • Make connected_port not public
  • Provide a different way of allowing tests to see what ports we're connected to. It should support ALL ports we are currently bound to w/tcp AND ssl, not just the last one we bound to w/TCP.
@nateberkopec
Copy link
Member Author

A big upside of this will be that we can then rm UniquePort and use port 0 everywhere in the tests, using connected_ports (? suggested name) to figure out what we got bound to.

@MSP-Greg
Copy link
Member

A big upside of this will be that we can then rm UniquePort

I'm not thinking about this right now (systemd). But, what may work with 'normal Puma use' may not work with parallel testing.

Personally, I always considered sockets to be two objects communicating on an agreed upon channel/port. So 'port 0' always seemed odd. Puma is only creating one of the objects. If it was creating both, that would be different...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants