test(opencode): synchronize shell cancellation (#33386)
This commit is contained in:
@@ -1711,11 +1711,17 @@ unixNoLLMServer(
|
|||||||
withSh(() =>
|
withSh(() =>
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
const { prompt, run, chat } = yield* boot()
|
const { prompt, run, chat } = yield* boot()
|
||||||
|
const { directory: dir } = yield* TestInstance
|
||||||
|
const afs = yield* FSUtil.Service
|
||||||
|
const ready = path.join(dir, ".shell-ready")
|
||||||
|
|
||||||
const sh = yield* prompt
|
const sh = yield* prompt
|
||||||
.shell({ sessionID: chat.id, agent: "build", command: "sleep 30" })
|
.shell({ sessionID: chat.id, agent: "build", command: ": > '.shell-ready'; sleep 30" })
|
||||||
.pipe(Effect.forkChild)
|
.pipe(Effect.forkChild)
|
||||||
yield* waitForBusy(chat.id)
|
yield* pollWithTimeout(
|
||||||
|
afs.existsSafe(ready).pipe(Effect.map((exists) => (exists ? (true as const) : undefined))),
|
||||||
|
"shell never created readiness marker",
|
||||||
|
)
|
||||||
|
|
||||||
yield* prompt.cancel(chat.id)
|
yield* prompt.cancel(chat.id)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user