fix(test): resolve LLM test timeouts by disabling file parallelism
Parallel test files each cold-load their own LLM model, competing for CPU and causing timeouts even at 120s. Sequential execution eliminates contention — tests that timed out at 30s now complete in 1-15s. Made-with: Cursor
This commit is contained in:
parent
3023ab3c99
commit
cfd640ed34
@ -358,7 +358,7 @@ describe("MCP Server", () => {
|
||||
expect(['lex', 'vec', 'hyde']).toContain(q.type);
|
||||
expect(q.query.length).toBeGreaterThan(0);
|
||||
}
|
||||
}, 30000); // 30s timeout for model loading
|
||||
}, 90000);
|
||||
|
||||
test("performs RRF fusion on multiple result lists", () => {
|
||||
const list1: RankedResult[] = [
|
||||
@ -431,7 +431,7 @@ describe("MCP Server", () => {
|
||||
);
|
||||
|
||||
expect(reranked.length).toBeGreaterThan(0);
|
||||
});
|
||||
}, 90000);
|
||||
});
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@ -624,7 +624,7 @@ describe("search (unified API)", () => {
|
||||
expect(results[0]).toHaveProperty("title");
|
||||
expect(results[0]).toHaveProperty("bestChunk");
|
||||
expect(results[0]).toHaveProperty("docid");
|
||||
});
|
||||
}, 90000);
|
||||
|
||||
test("search() with intent and rerank:false returns results", async () => {
|
||||
const results = await store.search({
|
||||
@ -633,7 +633,7 @@ describe("search (unified API)", () => {
|
||||
rerank: false,
|
||||
});
|
||||
expect(results.length).toBeGreaterThan(0);
|
||||
});
|
||||
}, 60000);
|
||||
|
||||
test("search() with collection filter", async () => {
|
||||
const results = await store.search({
|
||||
|
||||
@ -2494,7 +2494,7 @@ describe.skipIf(!!process.env.CI)("LlamaCpp Integration", () => {
|
||||
}
|
||||
|
||||
await cleanupTestDb(store);
|
||||
}, 30000);
|
||||
}, 90000);
|
||||
|
||||
test("expandQuery caches results as JSON with types", async () => {
|
||||
const store = await createTestStore();
|
||||
@ -2509,7 +2509,7 @@ describe.skipIf(!!process.env.CI)("LlamaCpp Integration", () => {
|
||||
expect(queries2[0]?.type).toBeDefined();
|
||||
|
||||
await cleanupTestDb(store);
|
||||
}, 30000);
|
||||
}, 60000);
|
||||
|
||||
test("rerank scores documents", async () => {
|
||||
const store = await createTestStore();
|
||||
|
||||
@ -3,6 +3,7 @@ import { defineConfig } from "vitest/config";
|
||||
export default defineConfig({
|
||||
test: {
|
||||
testTimeout: 30000,
|
||||
fileParallelism: false,
|
||||
include: ["test/**/*.test.ts"],
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user