feat: conditional task performance computation at the worker level
[poolifier.git] / tests / pools / selection-strategies / worker-choice-strategy-context.test.js
index d40fae4e028d8affa6375375b4f6d0d71eeafc47..5e202039f67ba4872c594294d480ed8cecb90da6 100644 (file)
@@ -368,10 +368,10 @@ describe('Worker choice strategy context test suite', () => {
         medRunTime: true
       }
     )
-    expect(workerChoiceStrategyContext.getRequiredStatistics().avgRunTime).toBe(
+    expect(workerChoiceStrategyContext.getTaskStatistics().avgRunTime).toBe(
       false
     )
-    expect(workerChoiceStrategyContext.getRequiredStatistics().medRunTime).toBe(
+    expect(workerChoiceStrategyContext.getTaskStatistics().medRunTime).toBe(
       true
     )
     workerChoiceStrategyContext = new WorkerChoiceStrategyContext(
@@ -381,10 +381,10 @@ describe('Worker choice strategy context test suite', () => {
         medRunTime: true
       }
     )
-    expect(workerChoiceStrategyContext.getRequiredStatistics().avgRunTime).toBe(
+    expect(workerChoiceStrategyContext.getTaskStatistics().avgRunTime).toBe(
       false
     )
-    expect(workerChoiceStrategyContext.getRequiredStatistics().medRunTime).toBe(
+    expect(workerChoiceStrategyContext.getTaskStatistics().medRunTime).toBe(
       true
     )
     const fsWorkerChoiceStrategy = WorkerChoiceStrategies.FAIR_SHARE
@@ -395,10 +395,10 @@ describe('Worker choice strategy context test suite', () => {
         medRunTime: true
       }
     )
-    expect(workerChoiceStrategyContext.getRequiredStatistics().avgRunTime).toBe(
+    expect(workerChoiceStrategyContext.getTaskStatistics().avgRunTime).toBe(
       false
     )
-    expect(workerChoiceStrategyContext.getRequiredStatistics().medRunTime).toBe(
+    expect(workerChoiceStrategyContext.getTaskStatistics().medRunTime).toBe(
       true
     )
     workerChoiceStrategyContext = new WorkerChoiceStrategyContext(
@@ -408,10 +408,10 @@ describe('Worker choice strategy context test suite', () => {
         medRunTime: true
       }
     )
-    expect(workerChoiceStrategyContext.getRequiredStatistics().avgRunTime).toBe(
+    expect(workerChoiceStrategyContext.getTaskStatistics().avgRunTime).toBe(
       false
     )
-    expect(workerChoiceStrategyContext.getRequiredStatistics().medRunTime).toBe(
+    expect(workerChoiceStrategyContext.getTaskStatistics().medRunTime).toBe(
       true
     )
   })