Repository navigation
Let the OS pick the test servers' TCP ports - #334
Merged
Merged
Conversation
The test servers listened for TCP on fixed ports 38881 and 38882. Both sit in Linux's ephemeral port range, so an outgoing connection can already hold one of them when a server starts. The secured server was given "localhost", which it binds on every address it resolves to while keeping the ones it could bind. With 127.0.0.1:38882 taken it listened on ::1 only, the IPv4 client got connection refused on every retry, and the secured subscription tests timed out. Both servers now use port 0 and report the port they got to clients, the same way RavenDB's own test servers run. The secured one binds 127.0.0.1 only, so it cannot end up reachable over IPv6 alone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
None, test infrastructure only.
What changed
The secured subscription tests failed now and then on CI with
queue.Emptytimeouts.The test servers listened for TCP on fixed ports 38881 and 38882, both inside Linux's ephemeral port range. An outgoing connection can already hold one of them when a server starts. The secured server was given
localhost, which it binds on every address it resolves to, keeping the ones it could bind. With127.0.0.1:38882taken it listened on::1only, the IPv4 client got connection refused on every retry, and the tests timed out.Both servers now use port 0 and report the port they got to clients, the same way RavenDB's own test servers run. The secured one binds
127.0.0.1only, so it cannot end up reachable over IPv6 alone.Reproduced on the 7.2 server image with
127.0.0.1:38882held: the two secured tests failed before this change. After it, they and all 22 subscription tests pass with the port held, and pass with it free.Checklist