repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: add multi tasks worker
[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..0d0611d00833523fc984bec11849ddfdf61e8d86 100644
(file)
--- a/
tests/worker-files/cluster/testWorker.js
+++ b/
tests/worker-files/cluster/testWorker.js
@@
-7,8
+7,11
@@
const { WorkerFunctions } = require('../../test-types')
function test (data) {
data = data || {}
data.function = data.function || WorkerFunctions.jsonIntegerSerialization
function test (data) {
data = data || {}
data.function = data.function || WorkerFunctions.jsonIntegerSerialization
- TestUtils.executeWorkerFunction(data)
- return isMaster
+ const result = TestUtils.executeWorkerFunction(data)
+ if (result == null) {
+ return isMaster
+ }
+ return result
}
module.exports = new ClusterWorker(test, {
}
module.exports = new ClusterWorker(test, {