Report some code cleanups from work in progress PR
[poolifier.git] / tests / worker-files / cluster / longRunningWorkerHardBehavior.js
index 04c78f4659738fa053ac67888663833d0a2eb2a1..73fdad01706c896c943b0291cb6da16bd8282ad5 100644 (file)
@@ -1,10 +1,9 @@
 'use strict'
 const { ClusterWorker, KillBehaviors } = require('../../../lib/index')
+const TestUtils = require('../../test-utils')
 
 async function sleep (data) {
-  return new Promise((resolve, reject) => {
-    setTimeout(() => resolve(data), 50000)
-  })
+  return TestUtils.workerSleepFunction(data, 50000)
 }
 
 module.exports = new ClusterWorker(sleep, {