diff --git a/service/tcp_test.go b/service/tcp_test.go index d287e43..e8f234f 100644 --- a/service/tcp_test.go +++ b/service/tcp_test.go @@ -102,7 +102,7 @@ func BenchmarkTCPFindCipherFail(b *testing.B) { } clientIP := clientConn.RemoteAddr().(*net.TCPAddr).AddrPort().Addr() b.StartTimer() - findAccessKey(clientConn, clientIP, cipherList, nil) + findAccessKey(clientConn, clientIP, cipherList, &noopLogger{}) b.StopTimer() } } @@ -205,7 +205,7 @@ func BenchmarkTCPFindCipherRepeat(b *testing.B) { cipher := cipherEntries[cipherNumber].CryptoKey go shadowsocks.NewWriter(writer, cipher).Write(makeTestPayload(50)) b.StartTimer() - _, _, _, _, err := findAccessKey(&c, clientIP, cipherList, nil) + _, _, _, _, err := findAccessKey(&c, clientIP, cipherList, &noopLogger{}) b.StopTimer() if err != nil { b.Error(err) diff --git a/service/udp_test.go b/service/udp_test.go index 1cf020e..0d62a02 100644 --- a/service/udp_test.go +++ b/service/udp_test.go @@ -409,7 +409,7 @@ func BenchmarkUDPUnpackFail(b *testing.B) { testIP := netip.MustParseAddr("192.0.2.1") b.ResetTimer() for n := 0; n < b.N; n++ { - findAccessKeyUDP(testIP, textBuf, testPayload, cipherList, nil) + findAccessKeyUDP(testIP, textBuf, testPayload, cipherList, &noopLogger{}) } } @@ -439,7 +439,7 @@ func BenchmarkUDPUnpackRepeat(b *testing.B) { cipherNumber := n % numCiphers ip := ips[cipherNumber] packet := packets[cipherNumber] - _, _, _, err := findAccessKeyUDP(ip, testBuf, packet, cipherList, nil) + _, _, _, err := findAccessKeyUDP(ip, testBuf, packet, cipherList, &noopLogger{}) if err != nil { b.Error(err) } @@ -468,7 +468,7 @@ func BenchmarkUDPUnpackSharedKey(b *testing.B) { b.ResetTimer() for n := 0; n < b.N; n++ { ip := ips[n%numIPs] - _, _, _, err := findAccessKeyUDP(ip, testBuf, packet, cipherList, nil) + _, _, _, err := findAccessKeyUDP(ip, testBuf, packet, cipherList, &noopLogger{}) if err != nil { b.Error(err) }