mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-30 07:43:42 +00:00
Remove unnecessary ratelimiting in tests (part 2)
Removed for ipn/ipnserver/server_test.go as well Signed-off-by: Wendi Yu <wendi.yu@yahoo.ca>
This commit is contained in:
parent
5b12473d70
commit
3c7ceb07f4
@ -13,8 +13,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"tailscale.com/types/logger"
|
|
||||||
|
|
||||||
"tailscale.com/ipn"
|
"tailscale.com/ipn"
|
||||||
"tailscale.com/ipn/ipnserver"
|
"tailscale.com/ipn/ipnserver"
|
||||||
"tailscale.com/safesocket"
|
"tailscale.com/safesocket"
|
||||||
@ -34,14 +32,12 @@ func TestRunMultipleAccepts(t *testing.T) {
|
|||||||
defer os.RemoveAll(td)
|
defer os.RemoveAll(td)
|
||||||
socketPath := filepath.Join(td, "tailscale.sock")
|
socketPath := filepath.Join(td, "tailscale.sock")
|
||||||
|
|
||||||
ulogf := func(format string, args ...interface{}) {
|
logf := func(format string, args ...interface{}) {
|
||||||
format = strings.TrimRight(format, "\n")
|
format = strings.TrimRight(format, "\n")
|
||||||
println(fmt.Sprintf(format, args...))
|
println(fmt.Sprintf(format, args...))
|
||||||
t.Logf(format, args...)
|
t.Logf(format, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
logf := logger.RateLimitedFn(ulogf, 1, 1, 100)
|
|
||||||
|
|
||||||
connect := func() {
|
connect := func() {
|
||||||
for i := 1; i <= 2; i++ {
|
for i := 1; i <= 2; i++ {
|
||||||
logf("connect %d ...", i)
|
logf("connect %d ...", i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user