X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fcluster%2FlongRunningWorkerHardBehavior.js;h=ee6b93cc87c922019d08d7809533b8f2b1305425;hb=b6fea09e6a8174e664770741943cf08445066e2b;hp=5c0b620239bdee156e8193cc43bc97d7bd70feed;hpb=cf597bc58029b9b5bf861c29fa9e917a6a72d859;p=poolifier.git diff --git a/tests/worker-files/cluster/longRunningWorkerHardBehavior.js b/tests/worker-files/cluster/longRunningWorkerHardBehavior.js index 5c0b6202..ee6b93cc 100644 --- a/tests/worker-files/cluster/longRunningWorkerHardBehavior.js +++ b/tests/worker-files/cluster/longRunningWorkerHardBehavior.js @@ -1,13 +1,12 @@ '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 sleep (data) { - return await TestUtils.workerSleepFunction(data, 50000) + return sleepTaskFunction(data, 50000) } module.exports = new ClusterWorker(sleep, { - maxInactiveTime: 500, - async: true, - killBehavior: KillBehaviors.HARD + killBehavior: KillBehaviors.HARD, + maxInactiveTime: 500 })