From 5d1d9e449070baa216199b1805968416e80e5e5f Mon Sep 17 00:00:00 2001 From: Jason Lernerman Date: Mon, 13 Jul 2026 07:45:15 -0400 Subject: [PATCH] give session e2e start the CLI's own readiness budget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test capped `agent daemon start` at 15s while the CLI itself waits up to 65s for daemon readiness. On a cold Windows runner the first execs of lk.exe, uv, and python are each Defender-scanned, and the chain (start daemon -> version probe -> spawn agent -> import livekit.agents -> connect) can exceed 15s with every step succeeding — the wrapper then kills the command mid-wait with no output. Wait 70s so the test only fails when the CLI itself reports a startup failure. --- cmd/lk/session_e2e_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/lk/session_e2e_test.go b/cmd/lk/session_e2e_test.go index fa44edc9d..1a7986979 100644 --- a/cmd/lk/session_e2e_test.go +++ b/cmd/lk/session_e2e_test.go @@ -103,7 +103,11 @@ func TestSessionE2E(t *testing.T) { }) // start: launches the detached daemon and returns once the agent is ready. - startOut, err := run(15*time.Second, "agent", "daemon", "start", "--port", port, entrypoint) + // The CLI itself waits up to 65s for daemon readiness (awaitDaemonReady), + // so give it just over that: on a cold Windows runner the chain of first + // execs (lk.exe, uv, python) can alone eat a tighter budget, and killing + // the command mid-wait loses the CLI's own error report. + startOut, err := run(70*time.Second, "agent", "daemon", "start", "--port", port, entrypoint) require.NoError(t, err, "session start failed:\n%s", startOut) require.Contains(t, startOut, "Session started.", "start did not report readiness:\n%s", startOut)