mirror of
https://github.com/cline/cline.git
synced 2026-09-01 15:11:04 +08:00
test(sdk): give windows-sensitive suites realistic timeouts
Four consecutive SDK publish runs failed on windows-latest, each on a different test, all of them plain timeouts: two @cline/shared SQLite tests at the 5s vitest default, core's bash executor at 10s, and the hub singleton endpoint test at 10s. The 2-core Windows runner spawns forks and takes SQLite locks slowly enough to blow those budgets under load. These timeouts guard against hangs; they are not timing assertions (the one suite that does assert elapsed time, shutdown.e2e, was fixed by removing file-level parallelism instead). Raise core to 20s and give @cline/shared an explicit 15s in place of the inherited 5s default.
This commit is contained in:
@@ -9,8 +9,12 @@ export default defineConfig({
|
||||
// pure unit tests. Windows hosted runners regularly exceed Vitest's 5s
|
||||
// default while starting those processes, so retain a bounded but realistic
|
||||
// budget and reduce Windows CI contention.
|
||||
testTimeout: 10_000,
|
||||
hookTimeout: 15_000,
|
||||
// windows-latest runners are 2-core and spawn forks slowly; the hub
|
||||
// suites additionally start real servers and take SQLite locks. These
|
||||
// budgets guard against hangs, they are not timing assertions, so give
|
||||
// them room rather than failing publishes on runner speed.
|
||||
testTimeout: 20_000,
|
||||
hookTimeout: 25_000,
|
||||
pool: "forks",
|
||||
...(process.env.CI && process.platform === "win32"
|
||||
? {
|
||||
|
||||
@@ -4,6 +4,10 @@ export default defineConfig({
|
||||
test: {
|
||||
environment: "node",
|
||||
include: ["src/**/*.test.ts"],
|
||||
// SQLite-backed tests routinely exceed vitest's 5s default on the
|
||||
// 2-core windows-latest runner. A hang guard, not a timing assertion.
|
||||
testTimeout: 15_000,
|
||||
hookTimeout: 15_000,
|
||||
exclude: ["src/**/*.e2e.test.ts"],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user