X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fcluster%2FlongRunningWorkerSoftBehavior.js;h=5c6fdf42679b72a7e213ce098240363016cf366c;hb=b0d6ed8f66e9636805462c83e4c9290dccebb690;hp=c4c00f6a17f41303be6636f59ebf2cb114adb153;hpb=85a3f8a7b3087e7240c1d307ba6dd78c05883f83;p=poolifier.git diff --git a/tests/worker-files/cluster/longRunningWorkerSoftBehavior.js b/tests/worker-files/cluster/longRunningWorkerSoftBehavior.js index c4c00f6a..5c6fdf42 100644 --- a/tests/worker-files/cluster/longRunningWorkerSoftBehavior.js +++ b/tests/worker-files/cluster/longRunningWorkerSoftBehavior.js @@ -1,10 +1,9 @@ 'use strict' -const { ClusterWorker } = require('../../../lib/index') +const { ClusterWorker } = require('../../../lib') +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, {