Stop udp connection allocation test hanging on linux. (#1578)

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)
This commit is contained in:
Peter Adams 2020-06-29 12:42:48 +01:00 committed by GitHub
parent 3a2fc0d39b
commit 16b9dd6a61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -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)
// Set the handlers that are applied to the bound channel
.channelInitializer { channel in
return channel.pipeline.addHandler(serverHandler)