Skip to content

Commit 300ae4a

Browse files
authored
test(agent): Fix TestAgent_UnixRemoteForwarding timeout (#7235)
1 parent 38a6d54 commit 300ae4a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

agent/agent_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,12 +733,15 @@ func TestAgent_UnixRemoteForwarding(t *testing.T) {
733733

734734
// It's possible that the socket is created but the server is not ready to
735735
// accept connections yet. We need to retry until we can connect.
736+
//
737+
// Note that we wait long here because if the tailnet connection has trouble
738+
// connecting, it could take 5 seconds or more to reconnect.
736739
var conn net.Conn
737740
require.Eventually(t, func() bool {
738741
var err error
739742
conn, err = net.Dial("unix", remoteSocketPath)
740743
return err == nil
741-
}, testutil.WaitShort, testutil.IntervalFast)
744+
}, testutil.WaitLong, testutil.IntervalFast)
742745
defer conn.Close()
743746
_, err = conn.Write([]byte("test"))
744747
require.NoError(t, err)

0 commit comments

Comments
 (0)