repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: ensure the task concurrency is respected at queued task
[poolifier.git]
/
tests
/
pools
/
abstract
/
abstract-pool.test.js
diff --git
a/tests/pools/abstract/abstract-pool.test.js
b/tests/pools/abstract/abstract-pool.test.js
index 10736b6bcd1c49e4b7dbbd7d8231ca4c93f69599..2c904362a742eb8594a00a9bf216e7cb3707e455 100644
(file)
--- a/
tests/pools/abstract/abstract-pool.test.js
+++ b/
tests/pools/abstract/abstract-pool.test.js
@@
-86,6
+86,18
@@
describe('Abstract pool test suite', () => {
})
it('Verify that dynamic pool sizing is checked', () => {
})
it('Verify that dynamic pool sizing is checked', () => {
+ expect(
+ () =>
+ new DynamicClusterPool(
+ 1,
+ undefined,
+ './tests/worker-files/cluster/testWorker.js'
+ )
+ ).toThrowError(
+ new TypeError(
+ 'Cannot instantiate a dynamic pool without specifying the maximum pool size'
+ )
+ )
expect(
() =>
new DynamicThreadPool(
expect(
() =>
new DynamicThreadPool(
@@
-103,7
+115,7
@@
describe('Abstract pool test suite', () => {
new DynamicClusterPool(
0,
0.5,
new DynamicClusterPool(
0,
0.5,
- './tests/worker-files/
thread
/testWorker.js'
+ './tests/worker-files/
cluster
/testWorker.js'
)
).toThrowError(
new TypeError(
)
).toThrowError(
new TypeError(
@@
-123,7
+135,7
@@
describe('Abstract pool test suite', () => {
new DynamicClusterPool(
1,
1,
new DynamicClusterPool(
1,
1,
- './tests/worker-files/
thread
/testWorker.js'
+ './tests/worker-files/
cluster
/testWorker.js'
)
).toThrowError(
new RangeError(
)
).toThrowError(
new RangeError(