X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fthread%2FasyncWorker.js;h=2b834b87fd33d9002bd664707159581824f90301;hb=refs%2Ftags%2Fv2.6.29;hp=6508d6dac5d313bcd41b458643fa1a7efd3d1124;hpb=9c8526b801b42a5b40bfa5cec6f6e2082ffc9da7;p=poolifier.git diff --git a/tests/worker-files/thread/asyncWorker.js b/tests/worker-files/thread/asyncWorker.js index 6508d6da..2b834b87 100644 --- a/tests/worker-files/thread/asyncWorker.js +++ b/tests/worker-files/thread/asyncWorker.js @@ -1,13 +1,12 @@ '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 sleep (data) { - return TestUtils.workerSleepFunction(data, 2000) + return sleepTaskFunction(data, 2000) } module.exports = new ThreadWorker(sleep, { maxInactiveTime: 500, - async: true, killBehavior: KillBehaviors.HARD })