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

@@ -56,7 +56,7 @@ var _ = Describe("Random RTT", func() {
runRTTTest := func(minRtt, maxRtt time.Duration, version protocol.VersionNumber) {
rand.Seed(time.Now().UnixNano())
var err error
proxy, err = quicproxy.NewQuicProxy("localhost:", version, quicproxy.Opts{
proxy, err = quicproxy.NewQuicProxy("localhost:", version, &quicproxy.Opts{
RemoteAddr: "localhost:" + testserver.Port(),
DelayPacket: func(_ quicproxy.Direction, _ protocol.PacketNumber) time.Duration {
return getRandomDuration(minRtt, maxRtt)