repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): bump @types/node
[poolifier.git]
/
tests
/
worker-files
/
cluster
/
longRunningWorkerHardBehavior.js
diff --git
a/tests/worker-files/cluster/longRunningWorkerHardBehavior.js
b/tests/worker-files/cluster/longRunningWorkerHardBehavior.js
index 04c78f4659738fa053ac67888663833d0a2eb2a1..a95d6538b49f3647c5376c8f4459db799ac92c6c 100644
(file)
--- a/
tests/worker-files/cluster/longRunningWorkerHardBehavior.js
+++ b/
tests/worker-files/cluster/longRunningWorkerHardBehavior.js
@@
-1,14
+1,12
@@
'use strict'
'use strict'
-const { ClusterWorker, KillBehaviors } = require('../../../lib/index')
+const { ClusterWorker, KillBehaviors } = require('../../../lib')
+const { sleepTaskFunction } = require('../../test-utils.js')
async function sleep (data) {
async function sleep (data) {
- return new Promise((resolve, reject) => {
- setTimeout(() => resolve(data), 50000)
- })
+ return sleepTaskFunction(data, 50000)
}
module.exports = new ClusterWorker(sleep, {
}
module.exports = new ClusterWorker(sleep, {
- maxInactiveTime: 500,
- async: true,
- killBehavior: KillBehaviors.HARD
+ killBehavior: KillBehaviors.HARD,
+ maxInactiveTime: 500
})
})