Merge dependabot/npm_and_yarn/examples/typescript/http-server-pool/fastify-worker_thr...
[poolifier.git] / tests / worker-files / thread / asyncErrorWorker.js
index 39f4055d771d7896c3d0cdf8d490af0d8baca64f..f696b101947d6dc7ed180feae6fe7a0f763797b6 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.workerSleepFunction(
+  return sleepTaskFunction(
     data,
     2000,
     true,
@@ -12,7 +12,6 @@ async function error (data) {
 }
 
 module.exports = new ThreadWorker(error, {
-  maxInactiveTime: 500,
-  async: true,
-  killBehavior: KillBehaviors.HARD
+  killBehavior: KillBehaviors.HARD,
+  maxInactiveTime: 500
 })