repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: cleanup main worker checks
[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 5496746dbc5e6f1edd7a0ee881807ff8ee57d6fa..953e50d07d09b43f1d36fb52317434b81e09152e 100644
(file)
--- a/
tests/pools/abstract/abstract-pool.test.js
+++ b/
tests/pools/abstract/abstract-pool.test.js
@@
-30,7
+30,7
@@
describe('Abstract pool test suite', () => {
numberOfWorkers,
'./tests/worker-files/thread/testWorker.js',
{
numberOfWorkers,
'./tests/worker-files/thread/testWorker.js',
{
- errorHandler:
e
=> console.error(e)
+ errorHandler:
(e)
=> console.error(e)
}
)
).toThrowError('Cannot start a pool from a worker!')
}
)
).toThrowError('Cannot start a pool from a worker!')
@@
-147,7
+147,7
@@
describe('Abstract pool test suite', () => {
new DynamicThreadPool(0, 0, './tests/worker-files/thread/testWorker.js')
).toThrowError(
new RangeError(
new DynamicThreadPool(0, 0, './tests/worker-files/thread/testWorker.js')
).toThrowError(
new RangeError(
- 'Cannot instantiate a dynamic pool with a pool size equal to zero'
+ 'Cannot instantiate a dynamic pool with a
maximum
pool size equal to zero'
)
)
})
)
)
})
@@
-175,7
+175,7
@@
describe('Abstract pool test suite', () => {
expect(pool.opts.onlineHandler).toBeUndefined()
expect(pool.opts.exitHandler).toBeUndefined()
await pool.destroy()
expect(pool.opts.onlineHandler).toBeUndefined()
expect(pool.opts.exitHandler).toBeUndefined()
await pool.destroy()
- const testHandler = () => console.
log
('test handler executed')
+ const testHandler = () => console.
info
('test handler executed')
pool = new FixedThreadPool(
numberOfWorkers,
'./tests/worker-files/thread/testWorker.js',
pool = new FixedThreadPool(
numberOfWorkers,
'./tests/worker-files/thread/testWorker.js',
@@
-741,7
+741,7
@@
describe('Abstract pool test suite', () => {
const promises = new Set()
let poolFull = 0
let poolInfo
const promises = new Set()
let poolFull = 0
let poolInfo
- pool.emitter.on(PoolEvents.full,
info
=> {
+ pool.emitter.on(PoolEvents.full,
(info)
=> {
++poolFull
poolInfo = info
})
++poolFull
poolInfo = info
})
@@
-778,7
+778,7
@@
describe('Abstract pool test suite', () => {
)
let poolInfo
let poolReady = 0
)
let poolInfo
let poolReady = 0
- pool.emitter.on(PoolEvents.ready,
info
=> {
+ pool.emitter.on(PoolEvents.ready,
(info)
=> {
++poolReady
poolInfo = info
})
++poolReady
poolInfo = info
})
@@
-810,7
+810,7
@@
describe('Abstract pool test suite', () => {
const promises = new Set()
let poolBusy = 0
let poolInfo
const promises = new Set()
let poolBusy = 0
let poolInfo
- pool.emitter.on(PoolEvents.busy,
info
=> {
+ pool.emitter.on(PoolEvents.busy,
(info)
=> {
++poolBusy
poolInfo = info
})
++poolBusy
poolInfo = info
})