repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps): bump poolifier
[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..57715266bcf7c181c955b4995ec4ee9b9c46c981 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-util
s')
-const {
WorkerFunctions } = require('../../test-type
s')
+const
{ executeTaskFunction } = require('../../test-utils.j
s')
+const {
TaskFunctions } = require('../../test-types.j
s')
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
})
})