X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fcluster%2FasyncErrorWorker.js;h=f358fc3ea409ddb987efa05a1ab38ee245afc4df;hb=30d7f6e094a9b837fd85c74ef23188ab28e86644;hp=fba8423f4f46dec5e7c169d5316b82e5b3b2056e;hpb=6677a3d36e9e7241c54db7cd69daa40f52fcbcb3;p=poolifier.git diff --git a/tests/worker-files/cluster/asyncErrorWorker.js b/tests/worker-files/cluster/asyncErrorWorker.js index fba8423f..f358fc3e 100644 --- a/tests/worker-files/cluster/asyncErrorWorker.js +++ b/tests/worker-files/cluster/asyncErrorWorker.js @@ -1,9 +1,9 @@ 'use strict' const { ClusterWorker, KillBehaviors } = require('../../../lib') -const TestUtils = require('../../test-utils') +const { sleepTaskFunction } = require('../../test-utils.js') async function error (data) { - return TestUtils.sleepWorkerFunction( + return sleepTaskFunction( data, 2000, true, @@ -12,6 +12,6 @@ async function error (data) { } module.exports = new ClusterWorker(error, { - maxInactiveTime: 500, - killBehavior: KillBehaviors.HARD + killBehavior: KillBehaviors.HARD, + maxInactiveTime: 500 })