Skip to content

test(display): deflake async PTY tests (widen screen-wait timeout)#108

Merged
maxlandon merged 1 commit into
masterfrom
dev
Jun 1, 2026
Merged

test(display): deflake async PTY tests (widen screen-wait timeout)#108
maxlandon merged 1 commit into
masterfrom
dev

Conversation

@maxlandon

Copy link
Copy Markdown
Member

Problem

The Go workflow failed on the master push for #107 (the v1.2.2 merge):

completion_test.go:28: timed out waiting for "alpha" on screen
--- FAIL: TestAsyncRefreshCompletions (3.02s)

This is unrelated to the merged change (the skip-csi-sequence command). It's a flaky timeout in the PTY-based async-refresh test: under go test -race on a loaded GitHub runner, the PTY/render pipeline is starved (race instrumentation adds several-fold overhead), and the shared 3s screenWaitTimeout was too tight for tests that wait on a background goroutine growing the completion menu. The same code passed on the PR run; locally the test settles in well under 2s.

Fix

Raise screenWaitTimeout (the shared PTY screen-poll ceiling) from 3s to 15s. The pollers return the instant the awaited content appears, so a larger ceiling never slows a passing test — it only caps how long we wait before declaring failure. No production code is touched.

Verification

  • TestAsyncRefreshCompletions now completes in ~0.4s under -race.
  • Ran the full internal/display suite under -race 5× — all green (~9s each).
  • go vet and golangci-lint clean.

🤖 Generated with Claude Code

TestAsyncRefreshCompletions intermittently timed out on CI: under
`go test -race` on a loaded runner the PTY/render pipeline is starved
(race instrumentation adds several-fold overhead), and the shared 3s
screen-wait ceiling was too tight for the async-refresh tests, which wait
for a background goroutine to grow the menu. Locally the test settles in
well under 2s.

The pollers return the instant the awaited content appears, so a larger
ceiling never slows a passing test -- it only caps how long we wait before
declaring failure. Raise it to 15s. No production code is affected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.33%. Comparing base (aa06d08) to head (56348e2).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #108   +/-   ##
=======================================
  Coverage   38.33%   38.33%           
=======================================
  Files          59       59           
  Lines        9516     9516           
=======================================
  Hits         3648     3648           
  Misses       5785     5785           
  Partials       83       83           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maxlandon maxlandon merged commit 86b79fe into master Jun 1, 2026
11 checks passed
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