Skip to content

Commit

Permalink
fix worker test timing
Browse files Browse the repository at this point in the history
  • Loading branch information
negrel committed Oct 26, 2023
1 parent 9feb387 commit 85c20b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/worker_pool_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ test('worker pool enqueue task if all workers are full', async () => {
})

promises.push(p)

// Sleep so worker and task is started.
await Bun.sleep(10)
}

const results = await Promise.all(promises)
Expand Down

0 comments on commit 85c20b4

Please sign in to comment.