test(opencode): remove disposal event wait race (#30971)
This commit is contained in:
@@ -86,7 +86,7 @@ it.live("CLI bootstrap runs InstanceBootstrap before callback", () =>
|
|||||||
it.live("CLI bootstrap disposes the instance when the callback rejects", () =>
|
it.live("CLI bootstrap disposes the instance when the callback rejects", () =>
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
const tmp = yield* bootstrapFixture
|
const tmp = yield* bootstrapFixture
|
||||||
const disposed = yield* waitDisposed(tmp.directory).pipe(Effect.forkScoped)
|
const disposed = yield* waitDisposed(tmp.directory).pipe(Effect.forkScoped({ startImmediately: true }))
|
||||||
|
|
||||||
const exit = yield* Effect.promise(() =>
|
const exit = yield* Effect.promise(() =>
|
||||||
cliBootstrap(tmp.directory, async () => Promise.reject(new Error("boom"))),
|
cliBootstrap(tmp.directory, async () => Promise.reject(new Error("boom"))),
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ describe("config HttpApi", () => {
|
|||||||
"serves config update through the default server app",
|
"serves config update through the default server app",
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
const tmp = yield* tmpdirEffect({ config: { formatter: false, lsp: false } })
|
const tmp = yield* tmpdirEffect({ config: { formatter: false, lsp: false } })
|
||||||
const disposed = yield* waitDisposed(tmp.path).pipe(Effect.forkScoped)
|
const disposed = yield* waitDisposed(tmp.path).pipe(Effect.forkScoped({ startImmediately: true }))
|
||||||
|
|
||||||
const response = yield* Effect.promise(() =>
|
const response = yield* Effect.promise(() =>
|
||||||
Promise.resolve(
|
Promise.resolve(
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ describe("HttpApi instance context middleware", () => {
|
|||||||
directory: workspaceDir,
|
directory: workspaceDir,
|
||||||
})
|
})
|
||||||
yield* serveDisposeProbe()
|
yield* serveDisposeProbe()
|
||||||
const disposed = yield* waitDisposedEvent.pipe(Effect.forkScoped)
|
const disposed = yield* waitDisposedEvent.pipe(Effect.forkScoped({ startImmediately: true }))
|
||||||
|
|
||||||
const response = yield* HttpClientRequest.post(`/dispose-probe?workspace=${workspace.id}`).pipe(
|
const response = yield* HttpClientRequest.post(`/dispose-probe?workspace=${workspace.id}`).pipe(
|
||||||
HttpClient.execute,
|
HttpClient.execute,
|
||||||
|
|||||||
Reference in New Issue
Block a user