From 6251548f72c9d96ff09c54fbc447b1ae8097f857 Mon Sep 17 00:00:00 2001 From: Christian Haudum Date: Wed, 7 Dec 2022 09:34:34 +0100 Subject: [PATCH] fixup! fixup! Execute health checks for ring clients in parallel Signed-off-by: Christian Haudum --- ring/client/pool.go | 2 +- ring/client/pool_test.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ring/client/pool.go b/ring/client/pool.go index eed133d32..3cd2d03c5 100644 --- a/ring/client/pool.go +++ b/ring/client/pool.go @@ -39,7 +39,7 @@ type PoolConfig struct { CheckInterval time.Duration HealthCheckEnabled bool HealthCheckTimeout time.Duration - MaxConcurrentHealthChecks int + MaxConcurrentHealthChecks int // defaults to 16 } // Pool holds a cache of grpc_health_v1 clients. diff --git a/ring/client/pool_test.go b/ring/client/pool_test.go index e128814b4..eb657e92f 100644 --- a/ring/client/pool_test.go +++ b/ring/client/pool_test.go @@ -3,7 +3,6 @@ package client import ( "context" "fmt" - "os" "testing" "time" @@ -144,7 +143,7 @@ func TestCleanUnhealthy(t *testing.T) { CheckInterval: 1 * time.Second, HealthCheckTimeout: 5 * time.Millisecond, } - pool := NewPool("test", cfg, nil, nil, nil, log.NewLogfmtLogger(os.Stderr)) + pool := NewPool("test", cfg, nil, nil, nil, log.NewNopLogger()) pool.clients = clients pool.cleanUnhealthy()