Skip to content

2.0.24: processFunc is not a function in @artilleryio/int-core/lib/engine_http.js #3600

@jcollum-nutrien

Description

@jcollum-nutrien
VERSION INFO:

Artillery: 2.0.24
Node.js:   v22.15.1
OS:        darwin

I have a setup that has a couple of js functions that log things out as the test is running. When it gets to approx 11k-13k iterations it hits this error:

Iteration 14092, 🕐 Account 10247876: 796ms (200)
Iteration 13576, 🕐 Account 10247792: 2688ms (200)
Correlation ID: artillery-perf-testing-09888fe9-86eb-4d2f-96d5-12921adaf0e3
Iteration 13793, 🕐 Account 10247792: 2686ms (200)
Iteration 11568, 🕐 Account 10247792: 2693ms (200)
Iteration 13545, 🕐 Account 10246223: 680ms (200)
Correlation ID: artillery-perf-testing-8ee23a05-c4bc-4d35-bbc2-9482c2478f72
worker error, id: 4 TypeError [Error]: processFunc is not a function
    at iteratee (/Users/justin.collum/Documents/work/sales-docs/node_modules/@artilleryio/int-core/lib/engine_http.js:1014:7)
    at /Users/justin.collum/Documents/work/sales-docs/node_modules/async/dist/async.js:3113:16
    at replenish (/Users/justin.collum/Documents/work/sales-docs/node_modules/async/dist/async.js:1014:17)
    at /Users/justin.collum/Documents/work/sales-docs/node_modules/async/dist/async.js:1019:9
    at eachLimit$1 (/Users/justin.collum/Documents/work/sales-docs/node_modules/async/dist/async.js:3199:24)
    at Object.<anonymous> (/Users/justin.collum/Documents/work/sales-docs/node_modules/async/dist/async.js:1049:16)
    at runOnErrorHooks (/Users/justin.collum/Documents/work/sales-docs/node_modules/@artilleryio/int-core/lib/engine_http.js:1010:9)
    at /Users/justin.collum/Documents/work/sales-docs/node_modules/@artilleryio/int-core/lib/engine_http.js:770:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
error Command failed with exit code 11.

I have two functions in my processors file:

// ---- UUID injection ----
export function beforeScenario(context, _, next) {
  context.vars.CORR_ID = `artillery-perf-testing-${uuidv4()}`;
  console.log(`Correlation ID: ${context.vars.CORR_ID}`);

  return next();
}

export function evaluateTimings(requestParams, response, context, ee, next) {
  const accountId = context.vars.$loopElement; // Get current account ID
  const responseTime = response.timings?.phases?.total || 'unknown';
  const statusCode = response.statusCode;
  ++loopCount;

  console.log(
    `Iteration ${loopCount}, 🕐 Account ${accountId}: ${responseTime}ms (${statusCode})`
  );

  // Log slow requests (>10 seconds)
  if (responseTime > 10000) {
    console.log(`🐌 SLOW: Account ${accountId} took ${responseTime}ms`);
  }

  // Log very slow requests (>15 seconds)
  if (responseTime > 15000) {
    console.log(`🚨 VERY SLOW: Account ${accountId} took ${responseTime}ms`);
  }

  return next();
}

it's hitting those functions fine many times and then falling over around 10k iterations. I'll post conifg if needed. But these parts seem relevant:

export const config = {
  target: 'https://redacted',
  processor: '../processors.js',

...

export const scenarios = [
  {
    name: 'GQL perf testing',
    beforeScenario: 'beforeScenario',
...
              capture: { body: 'respBody' },
              afterResponse: ['evaluateTimings'], // add logResponse to see the http result
... 

Again, it seems to have no issue firing off those two functions. But it's hitting processFunc is not a function which tells me that there is a function missing. But the only functions I'm importing are being hit with no issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions