diff --git a/transport/internet/httpupgrade/httpupgrade_test.go b/transport/internet/httpupgrade/httpupgrade_test.go index f94298ca8a76..6fcb7a97b9fe 100644 --- a/transport/internet/httpupgrade/httpupgrade_test.go +++ b/transport/internet/httpupgrade/httpupgrade_test.go @@ -151,7 +151,7 @@ func TestDialWithRemoteAddr(t *testing.T) { return } - _, err = c.Write([]byte("Response")) + _, err = c.Write([]byte(c.RemoteAddr().String())) common.Must(err) }(conn) }) @@ -169,7 +169,7 @@ func TestDialWithRemoteAddr(t *testing.T) { var b [1024]byte n, err := conn.Read(b[:]) common.Must(err) - if string(b[:n]) != "Response" { + if string(b[:n]) != "1.1.1.1:0" { t.Error("response: ", string(b[:n])) } diff --git a/transport/internet/splithttp/splithttp_test.go b/transport/internet/splithttp/splithttp_test.go index 7e22c9adba29..d125cedde264 100644 --- a/transport/internet/splithttp/splithttp_test.go +++ b/transport/internet/splithttp/splithttp_test.go @@ -96,7 +96,7 @@ func TestDialWithRemoteAddr(t *testing.T) { return } - _, err = c.Write([]byte("Response")) + _, err = c.Write([]byte(c.RemoteAddr().String())) common.Must(err) }(conn) }) @@ -113,7 +113,7 @@ func TestDialWithRemoteAddr(t *testing.T) { var b [1024]byte n, _ := conn.Read(b[:]) - if string(b[:n]) != "Response" { + if string(b[:n]) != "1.1.1.1:0" { t.Error("response: ", string(b[:n])) } diff --git a/transport/internet/websocket/ws_test.go b/transport/internet/websocket/ws_test.go index 637b7f724a2b..5fcc0a471759 100644 --- a/transport/internet/websocket/ws_test.go +++ b/transport/internet/websocket/ws_test.go @@ -91,7 +91,7 @@ func TestDialWithRemoteAddr(t *testing.T) { return } - _, err = c.Write([]byte("Response")) + _, err = c.Write([]byte(c.RemoteAddr().String())) common.Must(err) }(conn) }) @@ -109,7 +109,7 @@ func TestDialWithRemoteAddr(t *testing.T) { var b [1024]byte n, err := conn.Read(b[:]) common.Must(err) - if string(b[:n]) != "Response" { + if string(b[:n]) != "1.1.1.1:0" { t.Error("response: ", string(b[:n])) }