use a kernel determined server address in proxy tests

Now we can execute the proxy tests in parallel without running into
"address already in use" errors.
This commit is contained in:
Marten Seemann
2017-09-10 23:54:19 +02:00
parent 71f7ab1326
commit 7ba9fb0f8b
6 changed files with 24 additions and 27 deletions

View File

@@ -45,7 +45,7 @@ var _ = Describe("Handshake RTT tests", func() {
server, err = quic.ListenAddr("localhost:0", testdata.GetTLSConfig(), serverConfig)
Expect(err).ToNot(HaveOccurred())
// start the proxy
proxy, err = quicproxy.NewQuicProxy("localhost:0", protocol.VersionWhatever, quicproxy.Opts{
proxy, err = quicproxy.NewQuicProxy("localhost:0", protocol.VersionWhatever, &quicproxy.Opts{
RemoteAddr: server.Addr().String(),
DelayPacket: func(_ quicproxy.Direction, _ protocol.PacketNumber) time.Duration { return rtt / 2 },
})