mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-10 01:48:40 +00:00
test(core): avoid models cache recovery race (#33525)
This commit is contained in:
parent
e0c0411003
commit
a3825286cf
1 changed files with 2 additions and 5 deletions
|
|
@ -157,15 +157,12 @@ describe("ModelsDev Service", () => {
|
|||
Effect.gen(function* () {
|
||||
yield* writeCacheText("{")
|
||||
const state = yield* Ref.make({ ...initialState, body: JSON.stringify(fixture2) })
|
||||
const context = yield* Layer.build(buildLayer(state))
|
||||
const result = yield* Effect.acquireUseRelease(
|
||||
Effect.sync(() => {
|
||||
Flag.OPENCODE_DISABLE_MODELS_FETCH = false
|
||||
}),
|
||||
() =>
|
||||
provided(
|
||||
state,
|
||||
ModelsDev.Service.use((s) => s.get()),
|
||||
),
|
||||
() => ModelsDev.Service.use((s) => s.get()).pipe(Effect.provide(context)),
|
||||
() =>
|
||||
Effect.sync(() => {
|
||||
Flag.OPENCODE_DISABLE_MODELS_FETCH = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue