test(hub-selection): raise windows-flaky beforeAll/test timeouts to 60s - #2507
Merged
Merged
Conversation
tests/unit/hub-selection.test.ts hit the default 30s hook/test timeout on Test Node 22 (windows-2022) across multiple unrelated PRs this session, always on slow tmpdir/DB-file I/O (mkdtempSync + a fresh better-sqlite3 file), never a real regression — both reruns passed cleanly. Mirrors the same per-file timeout-override fix already applied to another Windows-flaky test in this repo (PR #2490). Closes #2368 docs check acknowledged
Contributor
Greptile SummaryThis PR raises two Windows-flaky timeout limits in the hub-selection unit tests from the configured 30 seconds to 60 seconds.
Confidence Score: 5/5The PR appears safe to merge because both timeout forms are supported and honored by the repository’s Vitest version. The changes only extend timeout allowances for existing test setup and execution paths, with no accepted functional, security, or quality defects. Important Files Changed
Reviews (1): Last reviewed commit: "test(hub-selection): raise windows-flaky..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
tests/unit/hub-selection.test.tshas now hit the default 30s hook/test timeout onTest Node 22 (windows-2022)across multiple independent, otherwise-unrelated PRs this session (a docs-only README badge change, a lockfile-only chore, and two of my own earlier PRs in this /fixer run) — always the same two spots:beforeAllhook (fs.mkdtempSync+ a freshbetter-sqlite3file + schema init).'throws when the graph has no qualifying nodes with edges'test, which does its own separatemkdtempSync+ DB file (unlike every other test in the file, which reuses the single DBbeforeAllalready built).Every occurrence reran cleanly on retry — this is Windows-runner I/O slowness (the full Windows suite run is consistently ~470-500s, close to whatever margin exists before hitting the 30s per-hook/per-test ceiling), not a real regression in this file or whatever the triggering PR happened to touch.
Fix
Raised both to a 60s timeout via vitest's per-hook/per-test override — mirrors the identical fix already applied to a different Windows-flaky test in this repo (
tests/unit/lint-skill-read-binding-2344.test.ts, PR #2490).Did not pursue the issue's other two suggested options:
mkdtempSync+ a small sqlite init) isn't doing anything unusually slow — nothing to speed up algorithmically; the slowness is Windows-runner-environmental.Closes #2368
Test plan
vitest run tests/unit/hub-selection.test.ts— all 6 tests passvitest runsuite (5283 passed, 328 files) after rebuilding the native addon (stale in the fresh worktree, unrelated to this test-only change)tsc --noEmit,biome checkclean