+ it('Verify buildInternalWorkerChoiceStrategyOptions() behavior', () => {
+ const poolMaxSize = 10
+ const internalWorkerChoiceStrategyOptions =
+ buildInternalWorkerChoiceStrategyOptions(poolMaxSize)
+ expect(internalWorkerChoiceStrategyOptions).toStrictEqual({
+ retries:
+ poolMaxSize +
+ Object.keys(internalWorkerChoiceStrategyOptions.weights).length,
+ runTime: { median: false },
+ waitTime: { median: false },
+ elu: { median: false },
+ weights: expect.objectContaining({
+ 0: expect.any(Number),
+ [poolMaxSize - 1]: expect.any(Number)
+ })
+ })
+ })
+