X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fworker-files%2Fcluster%2FerrorWorker.js;h=d23ba27b31692d74866fdd2ddb2f9caf8763fac7;hb=54db4c85a9468f121dbd3939c779a5f14e23c937;hp=87df92543664b6e3c5395a52e8c822d65ea0c8b6;hpb=b8818d59f9e410ce2e3b0103b8372b3fa1badf8f;p=poolifier.git diff --git a/tests/worker-files/cluster/errorWorker.js b/tests/worker-files/cluster/errorWorker.js index 87df9254..d23ba27b 100644 --- a/tests/worker-files/cluster/errorWorker.js +++ b/tests/worker-files/cluster/errorWorker.js @@ -1,11 +1,12 @@ 'use strict' -const { ClusterWorker } = require('../../../lib/index') +const { ClusterWorker, KillBehaviors } = require('../../../lib/index') -function error (data) { +function error () { throw new Error('Error Message from ClusterWorker') } module.exports = new ClusterWorker(error, { maxInactiveTime: 500, - async: false + async: false, + killBehavior: KillBehaviors.HARD })