perf: use worker node key instead of heavy worker reference in hot code path
[poolifier.git] / tests / pools / thread / fixed.test.js
index 636121fd4812eb8705bb2aed57119e8b84f8bcfb..99b867786b62d95454dc660201f14c55254094d5 100644 (file)
@@ -87,13 +87,11 @@ describe('Fixed thread pool test suite', () => {
     )
     let poolReady = 0
     pool1.emitter.on(PoolEvents.ready, () => ++poolReady)
-    if (!pool1.info.ready) {
-      await waitPoolEvents(pool1, PoolEvents.ready, 1)
-    }
+    await waitPoolEvents(pool1, 'ready', 1)
     expect(poolReady).toBe(1)
   })
 
-  it("Verify that 'busy' event is emitted", async () => {
+  it("Verify that 'busy' event is emitted", () => {
     let poolBusy = 0
     pool.emitter.on(PoolEvents.busy, () => ++poolBusy)
     for (let i = 0; i < numberOfThreads * 2; i++) {