mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-10 03:28:26 +00:00
test(opencode): remove shell timeout output race (#30974)
This commit is contained in:
parent
5d7157fe51
commit
f8cf8fa983
1 changed files with 2 additions and 4 deletions
|
|
@ -1077,11 +1077,10 @@ describe("tool.shell abort", () => {
|
|||
projectRoot,
|
||||
Effect.gen(function* () {
|
||||
const result = yield* run({
|
||||
command: `echo started && sleep 60`,
|
||||
command: `sleep 60`,
|
||||
description: "Timeout test",
|
||||
timeout: 500,
|
||||
})
|
||||
expect(result.output).toContain("started")
|
||||
expect(result.output).toContain("shell tool terminated command after exceeding timeout")
|
||||
expect(result.output).toContain("retry with a larger timeout value in milliseconds")
|
||||
}),
|
||||
|
|
@ -1099,12 +1098,11 @@ describe("tool.shell abort", () => {
|
|||
expect(tool.description).toContain("commands will time out after 500ms")
|
||||
const result = yield* tool.execute(
|
||||
{
|
||||
command: `echo started && sleep 60`,
|
||||
command: `sleep 60`,
|
||||
description: "Default timeout test",
|
||||
},
|
||||
ctx,
|
||||
)
|
||||
expect(result.output).toContain("started")
|
||||
expect(result.output).toContain("exceeding timeout 500 ms")
|
||||
}),
|
||||
).pipe(Effect.provide(RuntimeFlags.layer({ bashDefaultTimeoutMs: 500 }))),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue