test: improve pool empty event test
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 28 Aug 2024 13:20:42 +0000 (15:20 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 28 Aug 2024 13:20:42 +0000 (15:20 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/pools/abstract-pool.test.mjs

index 77f7dc69ddf37a0e8f67abb96765db80feefe2e1..2e6ba76ba4a94eecd053a25aa8597ede9d0cf810 100644 (file)
@@ -1386,12 +1386,12 @@ describe('Abstract pool test suite', () => {
     await waitPoolEvents(pool, PoolEvents.empty, 1)
     expect(poolEmpty).toBe(1)
     expect(poolInfo).toStrictEqual({
-      busyWorkerNodes: expect.any(Number),
+      busyWorkerNodes: 0,
       defaultStrategy: WorkerChoiceStrategies.ROUND_ROBIN,
       executedTasks: expect.any(Number),
       executingTasks: expect.any(Number),
       failedTasks: expect.any(Number),
-      idleWorkerNodes: expect.any(Number),
+      idleWorkerNodes: 0,
       maxSize: numberOfWorkers,
       minSize: 0,
       ready: true,