X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fcluster%2FasyncErrorWorker.js;h=468a0ff92ce8dbedfa925eef3ed30b2d44a1e1d3;hb=563b18cd8fe9c211f15e9da91a299f2819abea01;hp=02daa5b5a1f3ee77d1eab04a5dcbc281bc0dd639;hpb=6db75ad932064c1415ff6f03645929530209a5fe;p=poolifier.git diff --git a/tests/worker-files/cluster/asyncErrorWorker.js b/tests/worker-files/cluster/asyncErrorWorker.js index 02daa5b5..468a0ff9 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/index') -const TestUtils = require('../../test-utils') +const { ClusterWorker, 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 ClusterWorker(error, { - maxInactiveTime: 500, - async: true, - killBehavior: KillBehaviors.HARD + killBehavior: KillBehaviors.HARD, + maxInactiveTime: 500 })