X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fthread%2FasyncErrorWorker.js;h=f696b101947d6dc7ed180feae6fe7a0f763797b6;hb=50b332ec235604105c6290eee79d16ab5757eac1;hp=b960997f807e499883097cc51c7bde94f5ad19c6;hpb=6db75ad932064c1415ff6f03645929530209a5fe;p=poolifier.git diff --git a/tests/worker-files/thread/asyncErrorWorker.js b/tests/worker-files/thread/asyncErrorWorker.js index b960997f..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.sleepWorkerFunction( + 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 })