From fc2e4ea134ee24579198f9ccae2f0d477a0814eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Tue, 29 Oct 2024 16:42:09 +0100 Subject: [PATCH] Fix test --- relay/client/picker.go | 5 ++++- relay/client/picker_test.go | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/relay/client/picker.go b/relay/client/picker.go index 480c79a4e..db05fe856 100644 --- a/relay/client/picker.go +++ b/relay/client/picker.go @@ -13,10 +13,13 @@ import ( ) const ( - connectionTimeout = 30 * time.Second maxConcurrentServers = 7 ) +var ( + connectionTimeout = 30 * time.Second +) + type connResult struct { RelayClient *Client Url string diff --git a/relay/client/picker_test.go b/relay/client/picker_test.go index 02c27d03b..1b7c186b4 100644 --- a/relay/client/picker_test.go +++ b/relay/client/picker_test.go @@ -8,6 +8,8 @@ import ( ) func TestServerPicker_UnavailableServers(t *testing.T) { + connectionTimeout = 5 * time.Second + sp := ServerPicker{ TokenStore: nil, PeerID: "test",