test: unify the last Windows spawn budgets to the 90s pattern

The built-bin help/usage case still used a win32-conditional 60/30s outer
budget while serializing six runBuiltBin calls, and startProfileLifecycle
lacked the execa timeout/killSignal the sibling helper has; the tool-ralph
cases pinned 20-30s explicit timeouts that the 90s lane default cannot
override. Align all of them to the SPAWN_TIMEOUT_MS + 30s (or 90s) pattern.
This commit is contained in:
Chinesezjc 2026-08-26 17:43:57 +08:00
parent 84692044af
commit b648ed75c9
2 changed files with 6 additions and 4 deletions

View file

@ -150,6 +150,8 @@ function startProfileLifecycle(fixture: ProfileLifecycleFixture, args: readonly
return execa(process.execPath, [dshBin, '--profile', 'lifecycle', ...args], {
cwd: fixture.home,
input: '',
timeout: SPAWN_TIMEOUT_MS,
killSignal: 'SIGKILL',
reject: false,
env: {
DSH_HOME: fixture.home,
@ -396,7 +398,7 @@ describe.skipIf(!existsSync(dshBin))('dsh BUILT bin (node lib/bin.js, no tsx)',
} finally {
rmSync(home, { recursive: true, force: true })
}
}, process.platform === 'win32' ? 60_000 : 30_000)
}, SPAWN_TIMEOUT_MS + 30_000)
it('reports SDK startup failure when stdin reaches EOF first', async () => {
const home = mkdtempSync(join(tmpdir(), 'dsh-built-sdk-startup-failure-'))

View file

@ -35,7 +35,7 @@ async function mountRalph(script: MockScript, config: toolRalph.Config) {
}
describe('dsh-tool-ralph over the real spawn and worker-thread stack', () => {
it('uses distinct empty-seed children, shared cwd, and only the prior bounded handoff', { timeout: 30_000 }, async () => {
it('uses distinct empty-seed children, shared cwd, and only the prior bounded handoff', { timeout: 90_000 }, async () => {
const firstReport = {
status: 'continue',
summary: 'ROUND_ONE_HANDOFF',
@ -115,7 +115,7 @@ describe('dsh-tool-ralph over the real spawn and worker-thread stack', () => {
await parentHandle.dispose()
})
it('reports the failed round and last good handoff when a child fails', { timeout: 30_000 }, async () => {
it('reports the failed round and last good handoff when a child fails', { timeout: 90_000 }, async () => {
const firstReport = {
status: 'continue',
summary: 'ROUND_ONE_HANDOFF',
@ -235,7 +235,7 @@ describe('dsh-tool-ralph over the real spawn and worker-thread stack', () => {
await parentHandle.dispose()
})
it('cancels the real worker and fresh child to quiescence', { timeout: 20_000 }, async () => {
it('cancels the real worker and fresh child to quiescence', { timeout: 90_000 }, async () => {
const { ctx, parent, parentHandle } = await mountRalph(['hang'], { maxRounds: 2 })
const children: Agent[] = []
const outcomes: string[] = []