test: refine test naming
[poolifier.git] / tests / worker-files / cluster / asyncErrorWorker.cjs
... / ...
CommitLineData
1'use strict'
2const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
3const { sleepTaskFunction } = require('../../test-utils.cjs')
4
5/**
6 *
7 * @param data
8 */
9async function error (data) {
10 return sleepTaskFunction(
11 data,
12 2000,
13 true,
14 'Error Message from ClusterWorker:async'
15 )
16}
17
18module.exports = new ClusterWorker(error, {
19 killBehavior: KillBehaviors.HARD,
20 maxInactiveTime: 500,
21})