Skip to content

test(ui): stop two UI tests from failing under load - #27

Merged
junior merged 1 commit into
p10node:mainfrom
Devehab:fix/flaky-ui-tests
Nov 6, 2026
Merged

junior merged 1 commit into
p10node:mainfrom
Devehab:fix/flaky-ui-tests

Conversation

@Devehab

@Devehab Devehab commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #24.

clickZone read the zone right after View(), but bubblezone records zones on its own goroutine after Scan() (its docs say an immediate Get may not see them yet). So under load the sidebar zone sometimes wasn't there and TestClickingCurrentKindLeavesDescribe failed with "no sidebar zone for pods". clickZone now waits up to two seconds for the zone to show up, which covers the other click tests too.

For TestKeypressLatency I went with the -short option from the issue: it's skipped under -short, and the test and release workflows now run go test -short ./.... just test and just test-perf still run it.

To check it I ran the click tests on one CPU (go test -count=30 -cpu 1 -run TestClicking -v ./internal/ui/): main failed 4 of 120 runs with "no sidebar zone for pods", and this branch failed 0 of 120. go vet ./..., go test ./..., go test -short ./... and go test -race ./internal/ui/ all pass.

clickZone read the zone right after View(), but bubblezone records zones
on its own goroutine after Scan(), so on a busy machine the sidebar zone
was sometimes not there yet ("no sidebar zone for pods"). It now waits
for the zone to show up, up to two seconds.

TestKeypressLatency checks a wall-clock bound that a busy runner can
miss. It is skipped under -short, and the test and release workflows run
go test -short. `just test-perf` still runs it.

Fixes p10node#24

Signed-off-by: Ehab Kahwati <[email protected]>
@junior
junior merged commit 307260a into p10node:main Nov 6, 2026
3 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.

Two UI tests are flaky under load: TestClickingCurrentKindLeavesDescribe and TestKeypressLatency

2 participants