Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
median: false
}
})
+ expect(() =>
+ pool.setWorkerChoiceStrategyOptions('invalidWorkerChoiceStrategyOptions')
+ ).toThrowError(
+ 'Invalid worker choice strategy options: must be a plain object'
+ )
+ expect(() =>
+ pool.setWorkerChoiceStrategyOptions({ weights: {} })
+ ).toThrowError(
+ 'Invalid worker choice strategy options: must have a weight for each worker node'
+ )
+ expect(() =>
+ pool.setWorkerChoiceStrategyOptions({ measurement: 'invalidMeasurement' })
+ ).toThrowError(
+ "Invalid worker choice strategy options: invalid measurement 'invalidMeasurement'"
+ )
await pool.destroy()
})