[quality] deflake TestDeliverStartupKick_BobReceivesKick: gate readiness clock on actual pane render - #4871
Conversation
…ess clock on actual pane render paneInject types the bob placeholder and sleeps a fixed 400ms; the test then enters deliverStartupKick, whose readiness poll is bounded by the TestMain-shrunk cliReadyTimeout=5s. On a loaded runner tmux paints slower than that, waitForCLIReadyForAgent times out, and the kick is (correctly) dropped — failing the test for reasons unrelated to the delivery path it pins. Observed 2 failures in 4 full-package runs. Add requirePaneShows (tmux_coverage_test.go), which polls capture-pane until the marker is actually visible (15s test-only deadline), and call it in TestDeliverStartupKick_BobReceivesKick before delivering the kick. Production timeouts under test are unchanged. Refs #4869 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: hive-quality[bot] <hive-quality[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but does not touch If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
…ock on actual pane render (#4875) paneInject types the goose-is-ready marker and sleeps a fixed 400ms; the test then enters deliverStartupKick, whose readiness poll is bounded by the TestMain-shrunk cliReadyTimeout. On a loaded runner tmux paints slower than that, waitForCLIReadyForAgent times out, and the kick is (correctly) dropped, failing the test for reasons unrelated to the delivery path it pins. Same root cause and pattern as the sibling test TestDeliverStartupKick_BobReceivesKick fixed in #4871. Call the existing requirePaneShows helper (tmux_coverage_test.go) before delivering the kick so the readiness clock only starts once the marker is actually visible in the pane. Production timeouts under test are unchanged. Refs #4869 Signed-off-by: Andy Anderson <andy@clubanderson.com>
Test Improvement
Test-only change, scoped to two files:
src/pkg/agent/tmux_coverage_test.go— newrequirePaneShowshelper: pollscapture-paneuntil the expected text is actually visible in the session's pane (15s test-only deadline), failing with the last capture on timeout.src/pkg/agent/bob_startup_kick_test.go—TestDeliverStartupKick_BobReceivesKicknow callsrequirePaneShows(t, session, bobInputPlaceholder)afterpaneInjectand beforedeliverStartupKick.Why:
paneInjecttypes the placeholder and sleeps a fixed 400ms; the test then entersdeliverStartupKick, whose readiness poll is bounded by the TestMain-shrunkcliReadyTimeout = 5s. Under load, tmux paints slower than that,waitForCLIReadyForAgenttimes out, and the kick is (correctly) dropped — flaking the test (observed 2 failures in 4 full-package runs, failing at 5.56s ≈ timeout + capture). Gating the readiness clock on the actual render removes the race without widening any production timeout the test exercises.Validation:
go vet ./pkg/agent/clean;go test -count=3 -run TestDeliverStartupKick ./pkg/agent/all pass.Disjointness: does not touch
activity_collector_test.go(#4864),dashboard/audit.go(#4863), or any proxy/auth-injection file (#4032).Related Issue
Fixes #4869
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5