test: improve IWRR coverage
[poolifier.git] / src / pools / selection-strategies / abstract-worker-choice-strategy.ts
index 91733b52c96cf1f7eff70142146965290772a3aa..d91f3c69e3ccf8782a5d945ad696aa1eea88d4c1 100644 (file)
@@ -57,7 +57,11 @@ export abstract class AbstractWorkerChoiceStrategy<
     protected readonly pool: IPool<Worker, Data, Response>,
     protected opts: InternalWorkerChoiceStrategyOptions
   ) {
-    this.setOptions(this.opts)
+    this.opts = buildInternalWorkerChoiceStrategyOptions(
+      this.pool.info.maxSize,
+      this.opts
+    )
+    this.setTaskStatisticsRequirements(this.opts)
     this.choose = this.choose.bind(this)
   }