From 300ae4a6bfa4eb56d65c4ce1b7b85810020e225a Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Fri, 21 Apr 2023 01:35:51 +0300 Subject: [PATCH] test(agent): Fix TestAgent_UnixRemoteForwarding timeout (#7235) --- agent/agent_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agent/agent_test.go b/agent/agent_test.go index effaa091b9..adc85ffe2f 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -733,12 +733,15 @@ func TestAgent_UnixRemoteForwarding(t *testing.T) { // It's possible that the socket is created but the server is not ready to // accept connections yet. We need to retry until we can connect. + // + // Note that we wait long here because if the tailnet connection has trouble + // connecting, it could take 5 seconds or more to reconnect. var conn net.Conn require.Eventually(t, func() bool { var err error conn, err = net.Dial("unix", remoteSocketPath) return err == nil - }, testutil.WaitShort, testutil.IntervalFast) + }, testutil.WaitLong, testutil.IntervalFast) defer conn.Close() _, err = conn.Write([]byte("test")) require.NoError(t, err)