Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Sep 20, 2024
1 parent 2f3393e commit 9b1b801
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions service/tcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions service/udp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
}
}

Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 9b1b801

Please sign in to comment.