From: Jérôme Benoit Date: Fri, 9 Jun 2023 10:33:57 +0000 (+0200) Subject: fix: fix build after merge with main branch X-Git-Tag: v2.6.0~7^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e460940e8d2a41a846b2334d54410807ffc2f421;p=poolifier.git fix: fix build after merge with main branch Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/selection-strategies/least-elu-worker-choice-strategy.ts b/src/pools/selection-strategies/least-elu-worker-choice-strategy.ts index fbbd48e3..5cc02bff 100644 --- a/src/pools/selection-strategies/least-elu-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/least-elu-worker-choice-strategy.ts @@ -24,12 +24,16 @@ export class LeastEluWorkerChoiceStrategy< implements IWorkerChoiceStrategy { /** @inheritDoc */ public readonly taskStatisticsRequirements: TaskStatisticsRequirements = { - runTime: false, - avgRunTime: false, - medRunTime: false, - waitTime: false, - avgWaitTime: false, - medWaitTime: false, + runTime: { + aggregate: false, + average: false, + median: false + }, + waitTime: { + aggregate: false, + average: false, + median: false + }, elu: true } @@ -39,7 +43,7 @@ export class LeastEluWorkerChoiceStrategy< opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS ) { super(pool, opts) - this.setTaskStatistics(this.opts) + this.setTaskStatisticsRequirements(this.opts) } /** @inheritDoc */ diff --git a/tests/pools/selection-strategies/selection-strategies.test.js b/tests/pools/selection-strategies/selection-strategies.test.js index d6099158..8e226860 100644 --- a/tests/pools/selection-strategies/selection-strategies.test.js +++ b/tests/pools/selection-strategies/selection-strategies.test.js @@ -604,12 +604,16 @@ describe('Selection strategies test suite', () => { expect( pool.workerChoiceStrategyContext.getTaskStatisticsRequirements() ).toStrictEqual({ - runTime: false, - avgRunTime: false, - medRunTime: false, - waitTime: false, - avgWaitTime: false, - medWaitTime: false, + runTime: { + aggregate: false, + average: false, + median: false + }, + waitTime: { + aggregate: false, + average: false, + median: false + }, elu: true }) await pool.destroy() @@ -622,12 +626,16 @@ describe('Selection strategies test suite', () => { expect( pool.workerChoiceStrategyContext.getTaskStatisticsRequirements() ).toStrictEqual({ - runTime: false, - avgRunTime: false, - medRunTime: false, - waitTime: false, - avgWaitTime: false, - medWaitTime: false, + runTime: { + aggregate: false, + average: false, + median: false + }, + waitTime: { + aggregate: false, + average: false, + median: false + }, elu: true }) // We need to clean up the resources after our test @@ -655,13 +663,13 @@ describe('Selection strategies test suite', () => { failed: 0 }, runTime: { - aggregation: 0, + aggregate: 0, average: 0, median: 0, history: expect.any(CircularArray) }, waitTime: { - aggregation: 0, + aggregate: 0, average: 0, median: 0, history: expect.any(CircularArray)