test: refine test naming
[poolifier.git] / tests / worker-files / cluster / testWorker.cjs
... / ...
CommitLineData
1'use strict'
2const { ClusterWorker, KillBehaviors } = require('../../../lib/index.cjs')
3const { executeTaskFunction } = require('../../test-utils.cjs')
4const { TaskFunctions } = require('../../test-types.cjs')
5
6/**
7 *
8 * @param data
9 */
10function test (data) {
11 data = data || {}
12 data.function = data.function || TaskFunctions.jsonIntegerSerialization
13 return executeTaskFunction(data)
14}
15
16module.exports = new ClusterWorker(test, {
17 killBehavior: KillBehaviors.HARD,
18 maxInactiveTime: 500,
19})