Skip to content

Commit

Permalink
fixup! fixup! Execute health checks for ring clients in parallel
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
  • Loading branch information
chaudum committed Dec 7, 2022
1 parent 1b6abd2 commit 6251548
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ring/client/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions ring/client/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package client
import (
"context"
"fmt"
"os"
"testing"
"time"

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

Expand Down

0 comments on commit 6251548

Please sign in to comment.