Refactor healthcheck sender and receiver to use configurable options (#4433)

This commit is contained in:
Zoltan Papp
2025-09-12 09:31:03 +02:00
committed by GitHub
parent cf7f6c355f
commit 0c6f671a7c
10 changed files with 186 additions and 176 deletions
+5 -5
View File
@@ -8,15 +8,15 @@ import (
)
func TestServerPicker_UnavailableServers(t *testing.T) {
connectionTimeout = 5 * time.Second
timeout := 5 * time.Second
sp := ServerPicker{
TokenStore: nil,
PeerID: "test",
TokenStore: nil,
PeerID: "test",
ConnectionTimeout: timeout,
}
sp.ServerURLs.Store([]string{"rel://dummy1", "rel://dummy2"})
ctx, cancel := context.WithTimeout(context.Background(), connectionTimeout+1)
ctx, cancel := context.WithTimeout(context.Background(), timeout+1)
defer cancel()
go func() {