} = require('../../../lib/index')
describe('Selection strategies test suite', () => {
} = require('../../../lib/index')
describe('Selection strategies test suite', () => {
it('Verify that WorkerChoiceStrategies enumeration provides string values', () => {
expect(WorkerChoiceStrategies.ROUND_ROBIN).toBe('ROUND_ROBIN')
expect(WorkerChoiceStrategies.LESS_RECENTLY_USED).toBe('LESS_RECENTLY_USED')
it('Verify that WorkerChoiceStrategies enumeration provides string values', () => {
expect(WorkerChoiceStrategies.ROUND_ROBIN).toBe('ROUND_ROBIN')
expect(WorkerChoiceStrategies.LESS_RECENTLY_USED).toBe('LESS_RECENTLY_USED')
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
// TODO: Create a better test to cover `RoundRobinWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `RoundRobinWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `RoundRobinWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `RoundRobinWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
// TODO: Create a better test to cover `LessRecentlyUsedWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `LessRecentlyUsedWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `LessRecentlyUsedWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `LessRecentlyUsedWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
// TODO: Create a better test to cover `FairShareChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `FairShareChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `FairShareChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `FairShareChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
const pool = new FixedThreadPool(
max,
'./tests/worker-files/thread/testWorker.js',
// TODO: Create a better test to cover `WeightedRoundRobinWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `WeightedRoundRobinWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `WeightedRoundRobinWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {
// TODO: Create a better test to cover `WeightedRoundRobinWorkerChoiceStrategy#choose`
const promises = []
for (let i = 0; i < max * 2; i++) {