refactor: remove unused method argument
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 6 Apr 2023 06:59:35 +0000 (08:59 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 6 Apr 2023 06:59:35 +0000 (08:59 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
src/pools/selection-strategies/worker-choice-strategy-context.ts
tests/pools/selection-strategies/worker-choice-strategy-context.test.js

index 476a523740807e14dc44a3c9d8ff5bc323d0b804..afd7914eceaef3e531e87f4fe7fdcd92b88dd27d 100644 (file)
@@ -189,7 +189,6 @@ export abstract class AbstractPool<
       })
     }
     this.workerChoiceStrategyContext.setWorkerChoiceStrategy(
-      this,
       workerChoiceStrategy
     )
   }
index 2d33738731c661e0df84a74a0ffa043e9e3b4e69..3fbf5e2360cb8fb15c3a16b926ae2c5fac906f5b 100644 (file)
@@ -88,7 +88,6 @@ export class WorkerChoiceStrategyContext<
    * @param workerChoiceStrategy - The worker choice strategy to set.
    */
   public setWorkerChoiceStrategy (
-    pool: IPoolInternal<Worker, Data, Response>,
     workerChoiceStrategy: WorkerChoiceStrategy
   ): void {
     if (this.workerChoiceStrategyType === workerChoiceStrategy) {
index cdefafebcc56a42f7a66490ad0489eaadf9a5d9f..7c46601f8df578d0050d6cf262004b7a5efaddae 100644 (file)
@@ -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(