fix tests

This commit is contained in:
ginuerzh 2020-01-01 17:45:20 +08:00
parent 56d90dfa70
commit 355847faa4
2 changed files with 6 additions and 6 deletions

View File

@ -128,7 +128,7 @@ func BenchmarkTCPDirectForwardParallel(b *testing.B) {
} }
func udpDirectForwardRoundtrip(t *testing.T, host string, data []byte) error { func udpDirectForwardRoundtrip(t *testing.T, host string, data []byte) error {
ln, err := UDPDirectForwardListener("localhost:0", 0) ln, err := UDPDirectForwardListener("localhost:0", nil)
if err != nil { if err != nil {
return err return err
} }
@ -172,7 +172,7 @@ func BenchmarkUDPDirectForward(b *testing.B) {
sendData := make([]byte, 128) sendData := make([]byte, 128)
rand.Read(sendData) rand.Read(sendData)
ln, err := UDPDirectForwardListener("localhost:0", 0) ln, err := UDPDirectForwardListener("localhost:0", nil)
if err != nil { if err != nil {
b.Error(err) b.Error(err)
} }
@ -207,7 +207,7 @@ func BenchmarkUDPDirectForwardParallel(b *testing.B) {
sendData := make([]byte, 128) sendData := make([]byte, 128)
rand.Read(sendData) rand.Read(sendData)
ln, err := UDPDirectForwardListener("localhost:0", 0) ln, err := UDPDirectForwardListener("localhost:0", nil)
if err != nil { if err != nil {
b.Error(err) b.Error(err)
} }
@ -279,7 +279,7 @@ func TestTCPRemoteForward(t *testing.T) {
} }
func udpRemoteForwardRoundtrip(t *testing.T, host string, data []byte) error { func udpRemoteForwardRoundtrip(t *testing.T, host string, data []byte) error {
ln, err := UDPRemoteForwardListener("localhost:0", nil, 0) ln, err := UDPRemoteForwardListener("localhost:0", nil, nil)
if err != nil { if err != nil {
return err return err
} }

View File

@ -302,7 +302,7 @@ func BenchmarkSSProxyParallel(b *testing.B) {
func shadowUDPRoundtrip(t *testing.T, host string, data []byte, func shadowUDPRoundtrip(t *testing.T, host string, data []byte,
clientInfo *url.Userinfo, serverInfo *url.Userinfo) error { clientInfo *url.Userinfo, serverInfo *url.Userinfo) error {
ln, err := ShadowUDPListener("localhost:0", serverInfo, 0) ln, err := ShadowUDPListener("localhost:0", serverInfo, nil)
if err != nil { if err != nil {
return err return err
} }
@ -361,7 +361,7 @@ func BenchmarkShadowUDP(b *testing.B) {
sendData := make([]byte, 128) sendData := make([]byte, 128)
rand.Read(sendData) rand.Read(sendData)
ln, err := ShadowUDPListener("localhost:0", url.UserPassword("chacha20-ietf", "123456"), 0) ln, err := ShadowUDPListener("localhost:0", url.UserPassword("chacha20-ietf", "123456"), nil)
if err != nil { if err != nil {
b.Error(err) b.Error(err)
} }