fix: fix build after merge with main
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 8 Jun 2023 18:17:20 +0000 (20:17 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 8 Jun 2023 18:17:20 +0000 (20:17 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/selection-strategies/least-elu-worker-choice-strategy.ts
tests/pools/selection-strategies/selection-strategies.test.js

index 6b3d10b37da19b31b04258a3452482d7d0a7b258..fbbd48e3c918568b3c493a8cff4e4044a67106bc 100644 (file)
@@ -4,7 +4,7 @@ import type { IWorker } from '../worker'
 import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
 import type {
   IWorkerChoiceStrategy,
-  TaskStatistics,
+  TaskStatisticsRequirements,
   WorkerChoiceStrategyOptions
 } from './selection-strategies-types'
 
@@ -23,7 +23,7 @@ export class LeastEluWorkerChoiceStrategy<
   extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
   implements IWorkerChoiceStrategy {
   /** @inheritDoc */
-  public readonly taskStatistics: TaskStatistics = {
+  public readonly taskStatisticsRequirements: TaskStatisticsRequirements = {
     runTime: false,
     avgRunTime: false,
     medRunTime: false,
index a0a86efe3e6567f3594a3ac5020fae566455760d..a1eeaeaf8b4e977ea9e8c962a2d74b25c42da711 100644 (file)
@@ -574,7 +574,9 @@ describe('Selection strategies test suite', () => {
       './tests/worker-files/thread/testWorker.js',
       { workerChoiceStrategy }
     )
-    expect(pool.workerChoiceStrategyContext.getTaskStatistics()).toStrictEqual({
+    expect(
+      pool.workerChoiceStrategyContext.getTaskStatisticsRequirements()
+    ).toStrictEqual({
       runTime: false,
       avgRunTime: false,
       medRunTime: false,
@@ -590,7 +592,9 @@ describe('Selection strategies test suite', () => {
       './tests/worker-files/thread/testWorker.js',
       { workerChoiceStrategy }
     )
-    expect(pool.workerChoiceStrategyContext.getTaskStatistics()).toStrictEqual({
+    expect(
+      pool.workerChoiceStrategyContext.getTaskStatisticsRequirements()
+    ).toStrictEqual({
       runTime: false,
       avgRunTime: false,
       medRunTime: false,