test(workflow): give the wedged-child waitFors loaded-runner headroom
The three wedged-child scenarios busy-spin their worker for 1.5s while the host waits for the start RPC; under a loaded 2-core CI runner (this branch adds several parallel suites) the RPC lands after vi.waitFor default 1s, failing the coverage lane three runs in a row at the same three sites. An explicit 10s waitFor timeout (well inside each test own 15s budget) makes the assertions load-tolerant without weakening them. Belongs upstream with dsh-workflow-workerthread; carried here because it gates this PR.
This commit is contained in:
@@ -602,7 +602,7 @@ describe('dsh-workflow-workerthread', () => {
|
||||
`),
|
||||
parent,
|
||||
})
|
||||
await vi.waitFor(() => { expect(provider.runs.length).toBe(1) })
|
||||
await vi.waitFor(() => { expect(provider.runs.length).toBe(1) }, { timeout: 10_000 })
|
||||
const before = Date.now()
|
||||
await handle.dispose()
|
||||
// Bounded by the grace (plus the terminate), never by the 1.5s spin.
|
||||
@@ -625,7 +625,7 @@ describe('dsh-workflow-workerthread', () => {
|
||||
`),
|
||||
parent,
|
||||
})
|
||||
await vi.waitFor(() => { expect(provider.runs.length).toBe(1) })
|
||||
await vi.waitFor(() => { expect(provider.runs.length).toBe(1) }, { timeout: 10_000 })
|
||||
const handleDispose = handle.dispose()
|
||||
const result = await handle.result
|
||||
// The script itself settled (the wrapper's own dispose RPC found the
|
||||
@@ -663,7 +663,7 @@ describe('dsh-workflow-workerthread', () => {
|
||||
`),
|
||||
parent,
|
||||
})
|
||||
await vi.waitFor(() => { expect(order.filter(entry => entry.startsWith('start:')).length).toBe(2) })
|
||||
await vi.waitFor(() => { expect(order.filter(entry => entry.startsWith('start:')).length).toBe(2) }, { timeout: 10_000 })
|
||||
const fast = provider.runs.find(run => (run.request.prompt[0] as { text?: string }).text === 'fast')!
|
||||
fast.settle(text('fast done'))
|
||||
handle.cancel('stop now')
|
||||
|
||||
Reference in New Issue
Block a user