Skip to content

Right-size the e2e control-plane timeouts (60s to 45s) - #84

Merged
danReynolds merged 1 commit into
mainfrom
danreynolds/e2e-timeout-rightsize
Jul 22, 2026
Merged

Right-size the e2e control-plane timeouts (60s to 45s)#84
danReynolds merged 1 commit into
mainfrom
danreynolds/e2e-timeout-rightsize

Conversation

@danReynolds

Copy link
Copy Markdown
Owner

Follow-up to #83. The 60s ceilings there were conservative guesses; this right-sizes them with data.

A timeout is a ceiling, not a wait — a transition that completes in 2s costs 2s. So the value never slowed passing runs (still ~73s total). But an over-generous ceiling surfaces a genuine hang slower and can mask a real slowdown, so tighter-but-sufficient is the better call — the point you raised.

The structural fix (awaitDataPath() warming the tunnel in setUpAll) is what removes the flake; these timeouts are only backstops for the one variable leg — Headscale auth latency. Right-sized:

  • recordUntil default 60s→45s, broadcast 60s→45s (50% headroom over the previously-flaky 30s; tight enough that a transition suddenly taking 40s still fails)
  • onNodeChanges first-emit 10s→5s (local stream; original was 2s)
  • awaitDataPath stays 90s — it's a setup readiness gate that returns in seconds on success, not a per-test wait

Verified at 45s: 36/36 clean, and 36/36 under full CPU saturation (10 hogs/10 cores) — harder than normal CI. Total wall time unchanged. Test-only.

🤖 Generated with Claude Code

Follow-up to the e2e reliability fix. The 60s ceilings there were picked
conservatively without data; a timeout is a ceiling not a wait (a transition
that completes in 2s costs 2s), so it never slowed passing runs -- but an
over-generous ceiling surfaces a genuine hang slower and can mask a real
slowdown, so tighter-but-sufficient is better.

The structural fix -- awaitDataPath() warming the tunnel in setUpAll -- is what
actually removes the flake; these timeouts are only backstops for the one
genuinely variable leg (Headscale auth latency). Sized to 45s: 50% headroom
over the previously-flaky 30s, tight enough that a transition suddenly taking
40s still fails the suite.

  - recordUntil default 60s -> 45s (control-plane transitions)
  - broadcast reconnect wait 60s -> 45s
  - onNodeChanges first-emit 10s -> 5s (local stream; original was 2s)

awaitDataPath's 90s is left as-is: it is a setup readiness gate, not a
per-test wait -- it returns in seconds on success and only spends the budget
if the path genuinely can't establish, where failing the whole group early
would be worse.

Verified at 45s: passed 36/36 clean AND 36/36 under full CPU saturation
(10 hogs on 10 cores) -- a harder condition than normal CI. Total wall time
unchanged (~73s), confirming the ceiling doesn't cost pass-time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@danReynolds
danReynolds merged commit 646ee9e into main Jul 22, 2026
3 checks passed
@danReynolds
danReynolds deleted the danreynolds/e2e-timeout-rightsize branch July 22, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant