fix(ci): stabilize readiness timing boundaries

This commit is contained in:
Tianyi Cui
2026-07-28 14:49:59 +08:00
parent 4c6fb8b957
commit eeaf4c7220
11 changed files with 71 additions and 24 deletions
+9 -6
View File
@@ -170,12 +170,15 @@ describe('pty-local real shell', () => {
controller.abort()
const result = await foreground.done
expectReadyForNextSend(result.waitReason)
const after = await ctx.pty.startSend(agent, created.sessionId, {
text: 'echo AFTER_SIGINT',
const afterReady = 'AFTER_SIGINT'
const afterCommand = 'printf "AFTER_%s\\n" SIGINT'
expect(afterCommand).not.toContain(afterReady)
const after = ctx.pty.startSend(agent, created.sessionId, {
text: afterCommand,
submit: true,
}).done
expect(after.viewport).toContain('AFTER_SIGINT')
expectReadyForNextSend(after.waitReason)
})
await waitForOutput(after, afterReady, 15_000)
expectReadyForNextSend((await after.done).waitReason)
await ctx.pty.kill(agent, created.sessionId)
}, 20_000)
}, 35_000)
})