Report more cleanups from work in progress PRs
[poolifier.git] / tests / worker-files / thread / longRunningWorkerSoftBehavior.js
index eed0586fd2e7d9254e81b1f6e51ad76b8914be19..1204809334544c44ca2eae19374bde4bc527b8af 100644 (file)
@@ -1,10 +1,9 @@
 'use strict'
 const { ThreadWorker } = require('../../../lib/index')
+const TestUtils = require('../../test-utils')
 
 async function sleep (data) {
-  return new Promise((resolve, reject) => {
-    setTimeout(() => resolve(data), 50000)
-  })
+  return await TestUtils.workerSleepFunction(data, 50000)
 }
 
 module.exports = new ThreadWorker(sleep, {