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