X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fcluster%2FlongRunningWorkerHardBehavior.js;h=ec08d42540de16f50f3ad6b08eb8dc1bb7826b03;hb=8662ea71e523af81c1138618f0e12b89df35ce8a;hp=04c78f4659738fa053ac67888663833d0a2eb2a1;hpb=85a3f8a7b3087e7240c1d307ba6dd78c05883f83;p=poolifier.git diff --git a/tests/worker-files/cluster/longRunningWorkerHardBehavior.js b/tests/worker-files/cluster/longRunningWorkerHardBehavior.js index 04c78f46..ec08d425 100644 --- a/tests/worker-files/cluster/longRunningWorkerHardBehavior.js +++ b/tests/worker-files/cluster/longRunningWorkerHardBehavior.js @@ -1,10 +1,9 @@ 'use strict' const { ClusterWorker, KillBehaviors } = require('../../../lib/index') +const TestUtils = require('../../test-utils') async function sleep (data) { - return new Promise((resolve, reject) => { - setTimeout(() => resolve(data), 50000) - }) + return TestUtils.sleepWorkerFunction(data, 50000) } module.exports = new ClusterWorker(sleep, {