From 054ceb865d6739a9d5b4b0ad5099f5fd4511fd5c Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 19 Dec 2017 13:37:37 +0100 Subject: [PATCH] avoid port in-use error in websocket test --- transport/internet/websocket/ws_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/internet/websocket/ws_test.go b/transport/internet/websocket/ws_test.go index 678c18b7b..4f3c906cf 100644 --- a/transport/internet/websocket/ws_test.go +++ b/transport/internet/websocket/ws_test.go @@ -67,7 +67,7 @@ func TestDialWithRemoteAddr(t *testing.T) { assert := With(t) listen, err := ListenWS(internet.ContextWithTransportSettings(context.Background(), &Config{ Path: "ws", - }), net.DomainAddress("localhost"), 13146, func(ctx context.Context, conn internet.Connection) bool { + }), net.DomainAddress("localhost"), 13148, func(ctx context.Context, conn internet.Connection) bool { go func(c internet.Connection) { defer c.Close() @@ -89,7 +89,7 @@ func TestDialWithRemoteAddr(t *testing.T) { assert(err, IsNil) ctx := internet.ContextWithTransportSettings(context.Background(), &Config{Path: "ws", Header: []*Header{{Key: "X-Forwarded-For", Value: "1.1.1.1"}}}) - conn, err := Dial(ctx, net.TCPDestination(net.DomainAddress("localhost"), 13146)) + conn, err := Dial(ctx, net.TCPDestination(net.DomainAddress("localhost"), 13148)) assert(err, IsNil) _, err = conn.Write([]byte("Test connection 1"))