docs: use kill handler in ws-cluster example
[poolifier.git] / tests / worker-files / thread / asyncErrorWorker.js
index b960997f807e499883097cc51c7bde94f5ad19c6..c73fd2919230f03234726bba99e957e86596206b 100644 (file)
@@ -1,9 +1,9 @@
 'use strict'
-const { ThreadWorker, KillBehaviors } = require('../../../lib/index')
-const TestUtils = require('../../test-utils')
+const { ThreadWorker, KillBehaviors } = require('../../../lib')
+const { sleepTaskFunction } = require('../../test-utils')
 
 async function error (data) {
-  return TestUtils.sleepWorkerFunction(
+  return sleepTaskFunction(
     data,
     2000,
     true,
@@ -13,6 +13,5 @@ async function error (data) {
 
 module.exports = new ThreadWorker(error, {
   maxInactiveTime: 500,
-  async: true,
   killBehavior: KillBehaviors.HARD
 })