repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1032 from poolifier/combine-prs-branch
[poolifier.git]
/
tests
/
pools
/
thread
/
dynamic.test.js
diff --git
a/tests/pools/thread/dynamic.test.js
b/tests/pools/thread/dynamic.test.js
index ea9964caab100ac04a17deba24682f287d79cc7e..e30099dd4f890097e5ee705662273ee1e04ce97e 100644
(file)
--- a/
tests/pools/thread/dynamic.test.js
+++ b/
tests/pools/thread/dynamic.test.js
@@
-61,6
+61,8
@@
describe('Dynamic thread pool test suite', () => {
pool.emitter.on(PoolEvents.destroy, () => ++poolDestroy)
await pool.destroy()
const numberOfExitEvents = await exitPromise
pool.emitter.on(PoolEvents.destroy, () => ++poolDestroy)
await pool.destroy()
const numberOfExitEvents = await exitPromise
+ expect(pool.started).toBe(false)
+ expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(min)
expect(poolDestroy).toBe(1)
})
expect(numberOfExitEvents).toBe(min)
expect(poolDestroy).toBe(1)
})
@@
-72,15
+74,15
@@
describe('Dynamic thread pool test suite', () => {
})
it('Should work even without opts in input', async () => {
})
it('Should work even without opts in input', async () => {
- const pool
1
= new DynamicThreadPool(
+ const pool = new DynamicThreadPool(
min,
max,
'./tests/worker-files/thread/testWorker.js'
)
min,
max,
'./tests/worker-files/thread/testWorker.js'
)
- const res = await pool
1
.execute()
+ const res = await pool.execute()
expect(res).toStrictEqual({ ok: 1 })
// We need to clean up the resources after our test
expect(res).toStrictEqual({ ok: 1 })
// We need to clean up the resources after our test
- await pool
1
.destroy()
+ await pool.destroy()
})
it('Verify scale thread up and down is working when long executing task is used:hard', async () => {
})
it('Verify scale thread up and down is working when long executing task is used:hard', async () => {