mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-13 23:52:06 +00:00
test(worktree): use timeoutOrElse for ready wait (#27180)
This commit is contained in:
@@ -29,11 +29,10 @@ const waitReady = Effect.fn("WorktreeTest.waitReady")(function* () {
|
||||
yield* Effect.addFinalizer(() => Effect.sync(() => GlobalBus.off("event", on)))
|
||||
|
||||
return Deferred.await(ready).pipe(
|
||||
Effect.race(
|
||||
Effect.sleep("10 seconds").pipe(
|
||||
Effect.flatMap(() => Effect.fail(new Error("timed out waiting for worktree.ready"))),
|
||||
),
|
||||
),
|
||||
Effect.timeoutOrElse({
|
||||
duration: "10 seconds",
|
||||
orElse: () => Effect.fail(new Error("timed out waiting for worktree.ready")),
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user