repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge dependabot/npm_and_yarn/examples/typescript/http-server-pool/fastify-worker_thr...
[poolifier.git]
/
tests
/
worker-files
/
cluster
/
testWorker.js
diff --git
a/tests/worker-files/cluster/testWorker.js
b/tests/worker-files/cluster/testWorker.js
index 3f50d102a8364a1dad1ed6d67317f13435dd5942..4511bcaacc72844582382b3a9e260df9dd4dc48a 100644
(file)
--- a/
tests/worker-files/cluster/testWorker.js
+++ b/
tests/worker-files/cluster/testWorker.js
@@
-1,17
+1,15
@@
'use strict'
'use strict'
-const { isMaster } = require('cluster')
const { ClusterWorker, KillBehaviors } = require('../../../lib')
const { ClusterWorker, KillBehaviors } = require('../../../lib')
-const
TestUtils
= require('../../test-utils')
-const {
Worker
Functions } = require('../../test-types')
+const
{ executeTaskFunction }
= require('../../test-utils')
+const {
Task
Functions } = require('../../test-types')
function test (data) {
data = data || {}
function test (data) {
data = data || {}
- data.function = data.function || WorkerFunctions.jsonIntegerSerialization
- TestUtils.executeWorkerFunction(data)
- return isMaster
+ data.function = data.function || TaskFunctions.jsonIntegerSerialization
+ return executeTaskFunction(data)
}
module.exports = new ClusterWorker(test, {
}
module.exports = new ClusterWorker(test, {
-
maxInactiveTime: 500
,
- killBehavior: KillBehaviors.HARD
+
killBehavior: KillBehaviors.HARD
,
+ maxInactiveTime: 500
})
})