repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Instrument the code at development build for istanbul (#347)
[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 a8a6bb9ee14a0e1e670bb12348dfc47a1590b1b3..549386073f3413ac26b44d43dc50fb88ff43a43e 100644
(file)
--- a/
tests/worker-files/cluster/testWorker.js
+++ b/
tests/worker-files/cluster/testWorker.js
@@
-1,9
+1,9
@@
'use strict'
'use strict'
-const { ClusterWorker } = require('../../../lib/index')
+const { ClusterWorker
, KillBehaviors
} = require('../../../lib/index')
const { isMaster } = require('cluster')
function test (data) {
const { isMaster } = require('cluster')
function test (data) {
- for (let i = 0; i <
=
50; i++) {
+ for (let i = 0; i < 50; i++) {
const o = {
a: i
}
const o = {
a: i
}
@@
-12,4
+12,7
@@
function test (data) {
return isMaster
}
return isMaster
}
-module.exports = new ClusterWorker(test, { maxInactiveTime: 500 })
+module.exports = new ClusterWorker(test, {
+ maxInactiveTime: 500,
+ killBehavior: KillBehaviors.HARD
+})