Skip to content

tests: stop waiting out timeouts that cannot change the result - #14

Merged
dlech merged 1 commit into
mainfrom
faster-tests
Nov 24, 2026
Merged

dlech merged 1 commit into
mainfrom
faster-tests

Conversation

@dlech

@dlech dlech commented Nov 24, 2026

Copy link
Copy Markdown
Member

The whole suite took about six minutes on Windows, more than half of it waiting:

  • Connecting by name: a connect that finds a hub waits PREFERENCE_SECONDS for a better route. Simulated hubs are all heard at once, so under test every connect not made by id only ever waited this out. An autouse fixture in the root conftest makes it 0.05 s.
  • Hardware tests with no hub on: each one scanned for SCAN_SECONDS before skipping. The first test's answer is now kept for the rest.
  • test_connecting_to_a_hub_that_is_not_there: it waited out the full 10 s scan. It now scans for 0.3 s, as its neighbours do.

Six minutes down to three and a half, with nothing skipped that wasn't skipped before.

Merging this with the pb connect PR (the branch connect-honors-use) needs one more line: the root conftest fixture should also shorten the new AMBIGUITY_SECONDS. The late-hub test in that PR then sets it back to 1 s.

The whole suite took six minutes on Windows, more than half of it spent
waiting.

- A connect that finds a hub waits PREFERENCE_SECONDS for a better route
  to it. Simulated hubs are all heard at once, so under test that wait
  was only ever waited out, by every connect not made by id. An autouse
  fixture in the root conftest makes it 0.05 s.
- With no hub switched on, each hardware test scanned for SCAN_SECONDS
  before skipping. The first one's answer is now kept for the rest.
- test_connecting_to_a_hub_that_is_not_there waited out the full
  ten-second scan. It now scans for 0.3 s, as its neighbours do.

Six minutes to three and a half, with nothing skipped that was not
skipped before.
@dlech
dlech merged commit efb1426 into main Nov 24, 2026
23 checks passed
@dlech
dlech deleted the faster-tests branch November 24, 2026 00:09
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