X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fthread%2FlongRunningWorkerHardBehavior.js;h=e7d84df9fe0205ab747559c2f8fa390c008349ea;hb=3725d989b40800f70d495107b363c7efa2c96fc3;hp=3c707eb55548adeb2ac587381161bb41d8adb084;hpb=9c8526b801b42a5b40bfa5cec6f6e2082ffc9da7;p=poolifier.git diff --git a/tests/worker-files/thread/longRunningWorkerHardBehavior.js b/tests/worker-files/thread/longRunningWorkerHardBehavior.js index 3c707eb5..e7d84df9 100644 --- a/tests/worker-files/thread/longRunningWorkerHardBehavior.js +++ b/tests/worker-files/thread/longRunningWorkerHardBehavior.js @@ -1,13 +1,12 @@ '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 sleep (data) { - return TestUtils.workerSleepFunction(data, 50000) + return sleepTaskFunction(data, 50000) } module.exports = new ThreadWorker(sleep, { - maxInactiveTime: 500, - async: true, - killBehavior: KillBehaviors.HARD + killBehavior: KillBehaviors.HARD, + maxInactiveTime: 500 })