diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55716101a2..aa36a92dc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -446,7 +446,7 @@ jobs: env: DSH_COVERAGE_MAX_WORKERS: '6' DSH_COVERAGE_PARTITIONS: '4' - DSH_COVERAGE_TEST_TIMEOUT_MS: '60000' + DSH_COVERAGE_TEST_TIMEOUT_MS: '30000' DSH_GATE_CONCURRENCY: '3' steps: - uses: actions/checkout@v6 diff --git a/packages/subagent/subagent-acp/tests/subagent-acp.spec.ts b/packages/subagent/subagent-acp/tests/subagent-acp.spec.ts index 841c0d8f45..a7e5693148 100644 --- a/packages/subagent/subagent-acp/tests/subagent-acp.spec.ts +++ b/packages/subagent/subagent-acp/tests/subagent-acp.spec.ts @@ -1,4 +1,4 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import { chmodSync, existsSync, mkdtempSync, realpathSync, rmSync, writeFileSync } from 'node:fs' @@ -14,6 +14,12 @@ import { acpStopReason, acpContentText, DEFAULT_DISPOSE_EOF_GRACE_MS, DEFAULT_DI import LocalSubprocessRuntime from '@deepseek-ai/dsh-subprocess-local' import { spawnSubprocess } from '@deepseek-ai/dsh-subprocess-local/src/spawn.ts' +// These tests spawn real ACP child subprocesses. On contended self-hosted +// Windows runners the default per-test budget is too tight, so give this file +// twice the configured default timeout (DSH_COVERAGE_TEST_TIMEOUT_MS in CI). +const DEFAULT_TEST_TIMEOUT_MS = Number(process.env.DSH_COVERAGE_TEST_TIMEOUT_MS ?? 5_000) +vi.setConfig({ testTimeout: DEFAULT_TEST_TIMEOUT_MS * 2 }) + /** * Keyless integration tests for the ACP subagent backend. Each spawns a REAL * subprocess — the scripted mock ACP server (tests/mock-acp-server.ts) — and