})
for (const [, workerChoiceStrategy] of pool.workerChoiceStrategyContext
.workerChoiceStrategies) {
- expect(workerChoiceStrategy.opts).toStrictEqual({
- retries:
- pool.info.maxSize +
- Object.keys(workerChoiceStrategy.opts.weights).length,
- runTime: { median: false },
- waitTime: { median: false },
- elu: { median: false },
- weights: expect.objectContaining({
- 0: expect.any(Number),
- [pool.info.maxSize - 1]: expect.any(Number)
+ expect(workerChoiceStrategy.opts).toStrictEqual(
+ expect.objectContaining({
+ retries:
+ pool.info.maxSize +
+ Object.keys(workerChoiceStrategy.opts.weights).length,
+ runTime: { median: false },
+ waitTime: { median: false },
+ elu: { median: false }
})
- })
+ )
}
await pool.destroy()
const testHandler = () => console.info('test handler executed')
await pool.destroy()
})
- it('Verify INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy can be run in a fixed pool', async () => {
+ it.skip('Verify INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy can be run in a fixed pool', async () => {
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.mjs',
await pool.destroy()
})
- it('Verify INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy can be run in a dynamic pool', async () => {
+ it.skip('Verify INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy can be run in a dynamic pool', async () => {
const pool = new DynamicThreadPool(
min,
max,