Skip to content

test: pause the clock so the logs poll check cannot race close - #6

Merged
ilyaZar merged 1 commit into
devfrom
fix-logs-poll-race
Oct 30, 2026
Merged

ilyaZar merged 1 commit into
devfrom
fix-logs-poll-race

Conversation

@ilyaZar

@ilyaZar ilyaZar commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

The dev run after #5 failed in tests/logs.spec.mjs (expected 1 log read after close, got 2) with code identical to the passing PR head.

  • page.clock.install() lets time flow, so on a slow runner the 2 s poll fires around the Close click and its request reaches the route after the test has taken its count
  • the clock is now paused and advanced explicitly, with a check that polling runs while the dialog is open
  • the negative check waits briefly for a late request; without that the test also passed with the cleanup removed from useLogTail (verified locally, it now fails with 2 vs 3)

Local: 20/20 repeated runs pass; lint, types and unit tests pass.

@ilyaZar
ilyaZar merged commit d32a94f into dev Oct 30, 2026
4 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