Skip to content

Commit

Permalink
fix race condition in Micro tests (#3815)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored Oct 22, 2024
1 parent 02d413e commit e0e504c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/effect/test/Micro.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ describe.concurrent("Micro", () => {
Micro.sync(() => {
done.push(i)
return i
}).pipe(Micro.delay(50)), { concurrency: "unbounded" }).pipe(Micro.fork)
yield* Micro.sleep(25)
}).pipe(Micro.delay(150)), { concurrency: "unbounded" }).pipe(Micro.fork)
yield* Micro.sleep(50)
yield* handle.interrupt
const result = yield* handle.await
assert.deepStrictEqual(result, Micro.exitInterrupt)
Expand All @@ -210,8 +210,8 @@ describe.concurrent("Micro", () => {
Micro.sync(() => {
done.push(i)
return i
}).pipe(Micro.delay(100)), { concurrency: 2 }).pipe(Micro.fork)
yield* Micro.sleep(150)
}).pipe(Micro.delay(200)), { concurrency: 2 }).pipe(Micro.fork)
yield* Micro.sleep(300)
yield* handle.interrupt
const result = yield* handle.await
assert.deepStrictEqual(result, Micro.exitInterrupt)
Expand Down

0 comments on commit e0e504c

Please sign in to comment.