From e85c449cfa39aead47dbb3253adfa7d3982f09c6 Mon Sep 17 00:00:00 2001 From: carlos-alm Date: Fri, 14 Aug 2026 11:53:06 -0600 Subject: [PATCH] test(hub-selection): raise windows-flaky beforeAll/test timeouts to 60s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/unit/hub-selection.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit/hub-selection.test.ts b/tests/unit/hub-selection.test.ts index 082180977..f937547d6 100644 --- a/tests/unit/hub-selection.test.ts +++ b/tests/unit/hub-selection.test.ts @@ -80,7 +80,7 @@ beforeAll(() => { insertEdge(db, orchestrator, leafHelper, 'calls'); db.close(); -}); +}, 60_000); // Windows CI runners have hit the default 30s hook timeout on slow tmpdir I/O (#2368) afterAll(() => { if (tmpDir) fs.rmSync(tmpDir, { recursive: true, force: true }); @@ -126,7 +126,11 @@ describe('selectHubTargets', () => { expect(second).toEqual(first); }); - it('throws when the graph has no qualifying nodes with edges', () => { + // Windows CI runners have hit the default 30s test timeout here on slow + // tmpdir/DB-file I/O (#2368) — this test does its own mkdtempSync + a + // fresh better-sqlite3 file, unlike the other tests in this file which + // reuse the single DB `beforeAll` already built. + it('throws when the graph has no qualifying nodes with edges', { timeout: 60_000 }, () => { const emptyDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-hub-selection-empty-')); const emptyDbPath = path.join(emptyDir, 'graph.db'); const db = new Database(emptyDbPath);