import { FixedClusterPool, FixedThreadPool } from '../../../lib/index.cjs'
import {
buildWorkerChoiceStrategyOptions,
- getWorkerChoiceStrategiesRetries
+ getWorkerChoiceStrategiesRetries,
} from '../../../lib/pools/selection-strategies/selection-strategies-utils.cjs'
describe('Selection strategies utils test suite', () => {
elu: { median: false },
weights: expect.objectContaining({
0: expect.any(Number),
- [pool.info.maxSize - 1]: expect.any(Number)
- })
+ [pool.info.maxSize - 1]: expect.any(Number),
+ }),
})
const workerChoiceStrategyOptions = {
runTime: { median: true },
elu: { median: true },
weights: {
0: 100,
- 1: 100
- }
+ 1: 100,
+ },
}
expect(
buildWorkerChoiceStrategyOptions(pool, workerChoiceStrategyOptions)
elu: { median: true },
weights: {
0: 100,
- 1: 100
- }
+ 1: 100,
+ },
}
expect(
getWorkerChoiceStrategiesRetries(pool, workerChoiceStrategyOptions)