repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: add queue tests
[poolifier.git]
/
tests
/
worker-files
/
thread
/
longRunningWorkerHardBehavior.js
diff --git
a/tests/worker-files/thread/longRunningWorkerHardBehavior.js
b/tests/worker-files/thread/longRunningWorkerHardBehavior.js
index 7d9714a8140aed85399c5b53aff47a6ec5b2a002..29c633bbb2d2bb3f12163a70cc2adfe4c7481306 100644
(file)
--- a/
tests/worker-files/thread/longRunningWorkerHardBehavior.js
+++ b/
tests/worker-files/thread/longRunningWorkerHardBehavior.js
@@
-1,10
+1,9
@@
'use strict'
'use strict'
-const { ThreadWorker, KillBehaviors } = require('../../../lib/index')
+const { ThreadWorker, KillBehaviors } = require('../../../lib')
+const TestUtils = require('../../test-utils')
async function sleep (data) {
async function sleep (data) {
- return new Promise((resolve, reject) => {
- setTimeout(() => resolve(data), 50000)
- })
+ return TestUtils.sleepWorkerFunction(data, 50000)
}
module.exports = new ThreadWorker(sleep, {
}
module.exports = new ThreadWorker(sleep, {