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
Stop udp connection allocation test hanging on linux. #1578
Conversation
Motivation: Hanging tests make doing work and asserting correctness very difficult. Modifications: Remove address reuse from the server side of the udp channel. Result: The tests no longer hang. (The reason things we hanging was that the client side was occasionally getting assigned the same port number as the server side (extremely agressive port reuse)
@@ -44,7 +44,6 @@ func run(identifier: String) { | |||
let serverHandler = CountReadsHandler(numberOfReadsExpected: numberOfIterations, | |||
completionPromise: group.next().makePromise()) | |||
let serverChannel = try! DatagramBootstrap(group: group) | |||
.channelOption(ChannelOptions.socketOption(.so_reuseaddr), value: 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to disable this on the client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, the server is where it should be disabled. Given that we were binding to 0
there was never any real advantage in having SO_REUSEADDR
turned on in this test anyway.
@@ -44,7 +44,6 @@ func run(identifier: String) { | |||
let serverHandler = CountReadsHandler(numberOfReadsExpected: numberOfIterations, | |||
completionPromise: group.next().makePromise()) | |||
let serverChannel = try! DatagramBootstrap(group: group) | |||
.channelOption(ChannelOptions.socketOption(.so_reuseaddr), value: 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, the server is where it should be disabled. Given that we were binding to 0
there was never any real advantage in having SO_REUSEADDR
turned on in this test anyway.
Motivation: Hanging tests make doing work and asserting correctness very difficult. Modifications: Remove address reuse from the server side of the udp channel. Result: The tests no longer hang. (The reason things we hanging was that the client side was occasionally getting assigned the same port number as the server side (extremely agressive port reuse)
Motivation:
Hanging tests make doing work and asserting correctness very difficult.
Modifications:
Remove address reuse from the server side of the udp channel.
Result:
The tests no longer hang.
(The reason things we hanging was that the client side was occasionally getting assigned the same port number as the server side (extremely agressive port reuse)