repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docs: fix docs/worker-choice-strategies.md structure
[poolifier.git]
/
tests
/
pools
/
thread
/
fixed.test.js
diff --git
a/tests/pools/thread/fixed.test.js
b/tests/pools/thread/fixed.test.js
index e4b99a6378d226535f83e47fb5516e3d394212f2..080ebad6ec8fa19b682bff11ae0f6634802c393e 100644
(file)
--- a/
tests/pools/thread/fixed.test.js
+++ b/
tests/pools/thread/fixed.test.js
@@
-1,6
+1,6
@@
const { expect } = require('expect')
const { FixedThreadPool, PoolEvents } = require('../../../lib')
const { expect } = require('expect')
const { FixedThreadPool, PoolEvents } = require('../../../lib')
-const {
Worker
Functions } = require('../../test-types')
+const {
Task
Functions } = require('../../test-types')
const { waitPoolEvents, waitWorkerEvents } = require('../../test-utils')
describe('Fixed thread pool test suite', () => {
const { waitPoolEvents, waitWorkerEvents } = require('../../test-utils')
describe('Fixed thread pool test suite', () => {
@@
-27,7
+27,7
@@
describe('Fixed thread pool test suite', () => {
const emptyPool = new FixedThreadPool(
numberOfThreads,
'./tests/worker-files/thread/emptyWorker.js',
const emptyPool = new FixedThreadPool(
numberOfThreads,
'./tests/worker-files/thread/emptyWorker.js',
- { exitHandler: () => console.
log
('empty pool worker exited') }
+ { exitHandler: () => console.
info
('empty pool worker exited') }
)
const echoPool = new FixedThreadPool(
numberOfThreads,
)
const echoPool = new FixedThreadPool(
numberOfThreads,
@@
-64,11
+64,11
@@
describe('Fixed thread pool test suite', () => {
it('Verify that the function is executed in a worker thread', async () => {
let result = await pool.execute({
it('Verify that the function is executed in a worker thread', async () => {
let result = await pool.execute({
- function:
Worker
Functions.fibonacci
+ function:
Task
Functions.fibonacci
})
expect(result).toBe(75025)
result = await pool.execute({
})
expect(result).toBe(75025)
result = await pool.execute({
- function:
Worker
Functions.factorial
+ function:
Task
Functions.factorial
})
expect(result).toBe(9.33262154439441e157)
})
})
expect(result).toBe(9.33262154439441e157)
})