Skip to content

test: busy line accessibility tests tick on a test clock - #76

Merged
Paullo9 merged 1 commit into
mainfrom
claude/macemui-busy-clock
Nov 5, 2026
Merged

Paullo9 merged 1 commit into
mainfrom
claude/macemui-busy-clock

Conversation

@Paullo9

@Paullo9 Paullo9 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Requested by Paul

Fixes #75.

Cause. testTheBusyLineLabelFollowsTheTicks and testTheInfobarReadoutLabelFollowsTheTicks took Date() as the run's start and expected the first tick, read after a fixed spin(0.3), to say "0 s". On a loaded runner the main thread reached the first TimelineView tick a second or more after start, so it said "1 s" / "2 s" (the #70 failures).

Fix. Test-only. The metrics / line closures answer from a TestClock the test sets (0, then 2); the test spins the run loop until the expected tick lands (10 s timeout). The first check is still exact "0 s"; the later check tightens from "not 0 s / within one second of now" to exact "2 s", so the #39 regression (label stuck on the first tick) still fails.

Fails before / passes after. With a 1.5 s Thread.sleep inserted right after the start, the old tests fail with exactly the CI messages ("Disk detection · 2 s" vs "· 0 s", "1 s" vs "0 s"); the new tests pass with the same stall inserted.

🤖 Generated with Claude Code

Both BusyLineAccessibilityTests started a wall clock and expected the first
tick, read after a fixed 0.3 s spin, to say 0 s; a main thread a second late
(a loaded runner, #70) made the first tick say 1 s or 2 s. The readouts now
answer from a clock the test sets (0, then 2), and the test waits for the
tick. A 1.5 s main-thread stall after the start reproduces both CI failures
on the old tests and passes on the new. The later check is now exact.

Fixes #75.

Done: both tests deterministic under load. Next: nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Paullo9 Paullo9 self-assigned this Nov 5, 2026
@Paullo9
Paullo9 enabled auto-merge (squash) November 5, 2026 14:46
@Paullo9
Paullo9 merged commit 413158b into main Nov 5, 2026
6 checks passed
@Paullo9
Paullo9 deleted the claude/macemui-busy-clock branch November 5, 2026 14:54
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.

polish: BusyLineAccessibilityTests read the wall clock and fail on a loaded runner

1 participant