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
/
longRunningWorkerSoftBehavior.js
diff --git
a/tests/worker-files/cluster/longRunningWorkerSoftBehavior.js
b/tests/worker-files/cluster/longRunningWorkerSoftBehavior.js
index c4c00f6a17f41303be6636f59ebf2cb114adb153..cd057ef06562455a2b30a93140ba23efa404c568 100644
(file)
--- a/
tests/worker-files/cluster/longRunningWorkerSoftBehavior.js
+++ b/
tests/worker-files/cluster/longRunningWorkerSoftBehavior.js
@@
-1,13
+1,11
@@
'use strict'
'use strict'
-const { ClusterWorker } = require('../../../lib/index')
+const { ClusterWorker } = require('../../../lib')
+const { sleepTaskFunction } = require('../../test-utils')
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
+ maxInactiveTime: 500
})
})