test: use worker info where appropriates
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 15 Oct 2023 19:32:45 +0000 (21:32 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 15 Oct 2023 19:32:45 +0000 (21:32 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/pools/selection-strategies/selection-strategies.test.mjs

index 601d66c825680514f4092498decb7e06161e8c1d..fc8a6feb65c1bf21d33b4796e9ecaecdbe3a2716 100644 (file)
@@ -378,7 +378,7 @@ describe('Selection strategies test suite', () => {
     )
     let results = new Set()
     for (let i = 0; i < max; i++) {
-      results.add(pool.workerNodes[pool.chooseWorkerNode()].worker.id)
+      results.add(pool.workerNodes[pool.chooseWorkerNode()].info.id)
     }
     expect(results.size).toBe(max)
     await pool.destroy()
@@ -389,7 +389,7 @@ describe('Selection strategies test suite', () => {
     )
     results = new Set()
     for (let i = 0; i < max; i++) {
-      results.add(pool.workerNodes[pool.chooseWorkerNode()].worker.threadId)
+      results.add(pool.workerNodes[pool.chooseWorkerNode()].info.id)
     }
     expect(results.size).toBe(max)
     await pool.destroy()