Skip to content

Improve: count work instead of time in speed tests and keep tests off real DNS - #581

Merged
SandObserver merged 2 commits into
mainfrom
chore/count-work-in-speed-tests
Oct 27, 2026
Merged

SandObserver merged 2 commits into
mainfrom
chore/count-work-in-speed-tests

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Assert work counts instead of elapsed time: rows scanned in the badge filter test, list entries read and key listings in the two aliased import tests (through a counting proxy).
  • Run the hold test in latest on mocked setTimeout and Date instead of a 20 ms wall-clock bound.
  • Add test-support/no-such-host.js, which answers every lookup with ENOTFOUND, and use it in the four tests that looked up nonexistent names over real DNS.
  • Check the URL scheme in pingUnchecked before resolving the host, so a refused URL makes no DNS query. Add a test for it.
  • Wait until the System Summary frame has its zoom applied before measuring boxes.
  • Set a 20 minute globalTimeout on the Playwright suite.

Testing
All green. Each new count fails when its guard is removed. The backend suite passes with DNS answering nothing, apart from the resolver tests that start their own DNS server. The System Summary spec passed 50 of 50 runs in WebKit.

Changelog

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

@SandObserver SandObserver added the refractor Code improvement / cleanup, no behavior change label Oct 27, 2026
@SandObserver
SandObserver merged commit 459ff55 into main Oct 27, 2026
6 checks passed
@SandObserver
SandObserver deleted the chore/count-work-in-speed-tests branch October 27, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refractor Code improvement / cleanup, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant