workerChoiceStrategy
).roundWeights.length
).toBe(1)
+ expect(
+ Number.isSafeInteger(
+ pool.workerChoiceStrategyContext.workerChoiceStrategies.get(
+ workerChoiceStrategy
+ ).roundWeights[0]
+ )
+ ).toBe(true)
}
}
await pool.destroy()
await pool.destroy()
})
- it.skip('Verify INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy can be run in a fixed pool', async () => {
+ it('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',
pool.workerChoiceStrategyContext.workerChoiceStrategy
).roundWeights.length
).toBe(1)
+ expect(
+ Number.isSafeInteger(
+ pool.workerChoiceStrategyContext.workerChoiceStrategies.get(
+ pool.workerChoiceStrategyContext.workerChoiceStrategy
+ ).roundWeights[0]
+ )
+ ).toBe(true)
// We need to clean up the resources after our test
await pool.destroy()
})
- it.skip('Verify INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy can be run in a dynamic pool', async () => {
+ it('Verify INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy can be run in a dynamic pool', async () => {
const pool = new DynamicThreadPool(
min,
max,
pool.workerChoiceStrategyContext.workerChoiceStrategy
).roundWeights.length
).toBe(1)
+ expect(
+ Number.isSafeInteger(
+ pool.workerChoiceStrategyContext.workerChoiceStrategies.get(
+ pool.workerChoiceStrategyContext.workerChoiceStrategy
+ ).roundWeights[0]
+ )
+ ).toBe(true)
// We need to clean up the resources after our test
await pool.destroy()
})
pool.workerChoiceStrategyContext.workerChoiceStrategy
).roundWeights.length
).toBe(1)
+ expect(
+ Number.isSafeInteger(
+ pool.workerChoiceStrategyContext.workerChoiceStrategies.get(
+ pool.workerChoiceStrategyContext.workerChoiceStrategy
+ ).roundWeights[0]
+ )
+ ).toBe(true)
await pool.destroy()
pool = new DynamicThreadPool(
min,
pool.workerChoiceStrategyContext.workerChoiceStrategy
).roundWeights.length
).toBe(1)
+ expect(
+ Number.isSafeInteger(
+ pool.workerChoiceStrategyContext.workerChoiceStrategies.get(
+ pool.workerChoiceStrategyContext.workerChoiceStrategy
+ ).roundWeights[0]
+ )
+ ).toBe(true)
// We need to clean up the resources after our test
await pool.destroy()
})