diff --git a/agent/agent_test.go b/agent/agent_test.go index effaa091b982d..adc85ffe2f4c4 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)