X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fthread%2FasyncErrorWorker.js;h=c73fd2919230f03234726bba99e957e86596206b;hb=5441aea6894a5031667db6447634fa5d97f69e36;hp=ac9663304c101eb49504fe8ce989c7610228afe8;hpb=cdace0e5b9082804893de9501372490ee1064090;p=poolifier.git diff --git a/tests/worker-files/thread/asyncErrorWorker.js b/tests/worker-files/thread/asyncErrorWorker.js index ac966330..c73fd291 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') -const TestUtils = require('../../test-utils') +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 })