feat: conditional task performance computation at the worker level
[poolifier.git] / tests / pools / abstract / abstract-pool.test.js
index b88e489b7f05065b6ad780f454789b853cb8e85f..e85f112797c3267c79f11bf5d43132b2bbe85ff6 100644 (file)
@@ -193,9 +193,7 @@ describe('Abstract pool test suite', () => {
         medWaitTime: false
       })
     }
-    expect(
-      pool.workerChoiceStrategyContext.getRequiredStatistics()
-    ).toStrictEqual({
+    expect(pool.workerChoiceStrategyContext.getTaskStatistics()).toStrictEqual({
       runTime: true,
       avgRunTime: true,
       medRunTime: false,
@@ -212,9 +210,7 @@ describe('Abstract pool test suite', () => {
       .workerChoiceStrategies) {
       expect(workerChoiceStrategy.opts).toStrictEqual({ medRunTime: true })
     }
-    expect(
-      pool.workerChoiceStrategyContext.getRequiredStatistics()
-    ).toStrictEqual({
+    expect(pool.workerChoiceStrategyContext.getTaskStatistics()).toStrictEqual({
       runTime: true,
       avgRunTime: false,
       medRunTime: true,
@@ -231,9 +227,7 @@ describe('Abstract pool test suite', () => {
       .workerChoiceStrategies) {
       expect(workerChoiceStrategy.opts).toStrictEqual({ medRunTime: false })
     }
-    expect(
-      pool.workerChoiceStrategyContext.getRequiredStatistics()
-    ).toStrictEqual({
+    expect(pool.workerChoiceStrategyContext.getTaskStatistics()).toStrictEqual({
       runTime: true,
       avgRunTime: true,
       medRunTime: false,