X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fthread%2FasyncErrorWorker.js;h=f696b101947d6dc7ed180feae6fe7a0f763797b6;hb=c952530e1438061d68eaa5131d2a047192201b0e;hp=39f4055d771d7896c3d0cdf8d490af0d8baca64f;hpb=15d563152134452a245e4842b20fbf4030457e16;p=poolifier.git diff --git a/tests/worker-files/thread/asyncErrorWorker.js b/tests/worker-files/thread/asyncErrorWorker.js index 39f4055d..f696b101 100644 --- a/tests/worker-files/thread/asyncErrorWorker.js +++ b/tests/worker-files/thread/asyncErrorWorker.js @@ -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 })