@@ -220,7 +220,7 @@ describe({
220220 enableEvents : true ,
221221 restartWorkerOnError : true ,
222222 enableTasksQueue : false ,
223- workerChoiceStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
223+ workerChoiceStrategy : WorkerChoiceStrategies . LEAST_USED ,
224224 } )
225225 for (
226226 const [ , workerChoiceStrategy ] of pool . workerChoiceStrategiesContext
@@ -769,7 +769,7 @@ describe({
769769 worker : WorkerTypes . web ,
770770 started : true ,
771771 ready : true ,
772- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
772+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
773773 strategyRetries : 0 ,
774774 minSize : numberOfWorkers ,
775775 maxSize : numberOfWorkers ,
@@ -792,7 +792,7 @@ describe({
792792 worker : WorkerTypes . web ,
793793 started : true ,
794794 ready : true ,
795- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
795+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
796796 strategyRetries : 0 ,
797797 minSize : Math . floor ( numberOfWorkers / 2 ) ,
798798 maxSize : numberOfWorkers ,
@@ -1155,7 +1155,7 @@ describe({
11551155 worker : WorkerTypes . web ,
11561156 started : true ,
11571157 ready : true ,
1158- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
1158+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
11591159 strategyRetries : expect . any ( Number ) ,
11601160 minSize : Math . floor ( numberOfWorkers / 2 ) ,
11611161 maxSize : numberOfWorkers ,
@@ -1199,7 +1199,7 @@ describe({
11991199 worker : WorkerTypes . web ,
12001200 started : true ,
12011201 ready : true ,
1202- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
1202+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
12031203 strategyRetries : expect . any ( Number ) ,
12041204 minSize : numberOfWorkers ,
12051205 maxSize : numberOfWorkers ,
@@ -1217,7 +1217,7 @@ describe({
12171217 worker : WorkerTypes . web ,
12181218 started : true ,
12191219 ready : true ,
1220- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
1220+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
12211221 strategyRetries : expect . any ( Number ) ,
12221222 minSize : numberOfWorkers ,
12231223 maxSize : numberOfWorkers ,
@@ -1262,7 +1262,7 @@ describe({
12621262 worker : WorkerTypes . web ,
12631263 started : true ,
12641264 ready : true ,
1265- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
1265+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
12661266 strategyRetries : expect . any ( Number ) ,
12671267 minSize : Math . floor ( numberOfWorkers / 2 ) ,
12681268 maxSize : numberOfWorkers ,
@@ -1282,7 +1282,7 @@ describe({
12821282 worker : WorkerTypes . web ,
12831283 started : true ,
12841284 ready : true ,
1285- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
1285+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
12861286 strategyRetries : expect . any ( Number ) ,
12871287 minSize : Math . floor ( numberOfWorkers / 2 ) ,
12881288 maxSize : numberOfWorkers ,
@@ -1330,7 +1330,7 @@ describe({
13301330 started : true ,
13311331 ready : true ,
13321332 backPressure : true ,
1333- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
1333+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
13341334 strategyRetries : expect . any ( Number ) ,
13351335 minSize : numberOfWorkers ,
13361336 maxSize : numberOfWorkers ,
@@ -1354,7 +1354,7 @@ describe({
13541354 started : true ,
13551355 ready : true ,
13561356 backPressure : false ,
1357- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
1357+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
13581358 strategyRetries : expect . any ( Number ) ,
13591359 minSize : numberOfWorkers ,
13601360 maxSize : numberOfWorkers ,
@@ -1401,7 +1401,7 @@ describe({
14011401 worker : WorkerTypes . web ,
14021402 started : true ,
14031403 ready : true ,
1404- defaultStrategy : WorkerChoiceStrategies . ROUND_ROBIN ,
1404+ defaultStrategy : WorkerChoiceStrategies . LEAST_USED ,
14051405 strategyRetries : expect . any ( Number ) ,
14061406 minSize : 0 ,
14071407 maxSize : numberOfWorkers ,
@@ -1581,7 +1581,7 @@ describe({
15811581 expect ( [
15821582 ...dynamicThreadPool . workerChoiceStrategiesContext
15831583 . workerChoiceStrategies . keys ( ) ,
1584- ] ) . toStrictEqual ( [ WorkerChoiceStrategies . ROUND_ROBIN ] )
1584+ ] ) . toStrictEqual ( [ WorkerChoiceStrategies . LEAST_USED ] )
15851585 const echoTaskFunction = ( data ) => {
15861586 return data
15871587 }
@@ -1600,7 +1600,7 @@ describe({
16001600 ...dynamicThreadPool . workerChoiceStrategiesContext
16011601 . workerChoiceStrategies . keys ( ) ,
16021602 ] ) . toStrictEqual ( [
1603- WorkerChoiceStrategies . ROUND_ROBIN ,
1603+ WorkerChoiceStrategies . LEAST_USED ,
16041604 WorkerChoiceStrategies . LEAST_BUSY ,
16051605 ] )
16061606 expect ( dynamicThreadPool . listTaskFunctionsProperties ( ) ) . toStrictEqual ( [
@@ -1702,7 +1702,7 @@ describe({
17021702 ...dynamicThreadPool . workerChoiceStrategiesContext
17031703 . workerChoiceStrategies . keys ( ) ,
17041704 ] ) . toStrictEqual ( [
1705- WorkerChoiceStrategies . ROUND_ROBIN ,
1705+ WorkerChoiceStrategies . LEAST_USED ,
17061706 WorkerChoiceStrategies . LEAST_BUSY ,
17071707 ] )
17081708 expect ( dynamicThreadPool . listTaskFunctionsProperties ( ) ) . toStrictEqual ( [
@@ -1718,7 +1718,7 @@ describe({
17181718 expect ( [
17191719 ...dynamicThreadPool . workerChoiceStrategiesContext
17201720 . workerChoiceStrategies . keys ( ) ,
1721- ] ) . toStrictEqual ( [ WorkerChoiceStrategies . ROUND_ROBIN ] )
1721+ ] ) . toStrictEqual ( [ WorkerChoiceStrategies . LEAST_USED ] )
17221722 expect ( dynamicThreadPool . listTaskFunctionsProperties ( ) ) . toStrictEqual ( [
17231723 { name : DEFAULT_TASK_NAME } ,
17241724 { name : 'test' } ,
0 commit comments