From 1ae4d2778d03052177f35cd6e5c348a7fb6691f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 6 Apr 2023 08:59:35 +0200 Subject: [PATCH] refactor: remove unused method argument MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 1 - .../worker-choice-strategy-context.ts | 1 - .../worker-choice-strategy-context.test.js | 10 ---------- 3 files changed, 12 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 476a5237..afd7914e 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -189,7 +189,6 @@ export abstract class AbstractPool< }) } this.workerChoiceStrategyContext.setWorkerChoiceStrategy( - this, workerChoiceStrategy ) } diff --git a/src/pools/selection-strategies/worker-choice-strategy-context.ts b/src/pools/selection-strategies/worker-choice-strategy-context.ts index 2d337387..3fbf5e23 100644 --- a/src/pools/selection-strategies/worker-choice-strategy-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategy-context.ts @@ -88,7 +88,6 @@ export class WorkerChoiceStrategyContext< * @param workerChoiceStrategy - The worker choice strategy to set. */ public setWorkerChoiceStrategy ( - pool: IPoolInternal, workerChoiceStrategy: WorkerChoiceStrategy ): void { if (this.workerChoiceStrategyType === workerChoiceStrategy) { diff --git a/tests/pools/selection-strategies/worker-choice-strategy-context.test.js b/tests/pools/selection-strategies/worker-choice-strategy-context.test.js index cdefafeb..7c46601f 100644 --- a/tests/pools/selection-strategies/worker-choice-strategy-context.test.js +++ b/tests/pools/selection-strategies/worker-choice-strategy-context.test.js @@ -115,7 +115,6 @@ describe('Worker choice strategy context test suite', () => { WorkerChoiceStrategies.ROUND_ROBIN ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.ROUND_ROBIN ) expect( @@ -141,7 +140,6 @@ describe('Worker choice strategy context test suite', () => { WorkerChoiceStrategies.ROUND_ROBIN ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.ROUND_ROBIN ) expect( @@ -159,7 +157,6 @@ describe('Worker choice strategy context test suite', () => { fixedPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.LESS_USED ) expect( @@ -177,7 +174,6 @@ describe('Worker choice strategy context test suite', () => { dynamicPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.LESS_USED ) expect( @@ -195,7 +191,6 @@ describe('Worker choice strategy context test suite', () => { fixedPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.LESS_BUSY ) expect( @@ -213,7 +208,6 @@ describe('Worker choice strategy context test suite', () => { dynamicPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.LESS_BUSY ) expect( @@ -231,7 +225,6 @@ describe('Worker choice strategy context test suite', () => { fixedPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.FAIR_SHARE ) expect( @@ -249,7 +242,6 @@ describe('Worker choice strategy context test suite', () => { dynamicPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.FAIR_SHARE ) expect( @@ -267,7 +259,6 @@ describe('Worker choice strategy context test suite', () => { fixedPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - fixedPool, WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN ) expect( @@ -285,7 +276,6 @@ describe('Worker choice strategy context test suite', () => { dynamicPool ) workerChoiceStrategyContext.setWorkerChoiceStrategy( - dynamicPool, WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN ) expect( -- 2.34.1