Skip to content

workerInfo.idleTimeout not cleared in time, leading to AssertionError: 1 !== 0 since version 4.9.0 #816

@alan-agius4

Description

@alan-agius4

When a worker thread is used after workerInfo.idleTimeout has been set, the idleTimeout is not cleared before currentUsage is increased. This results in an AssertionError, as the system expects the worker's currentUsage() to be 0 when the idleTimeout fires, but it is actually 1 (or more) because the worker is active.

Stack Trace:

/home/runner/_work/clickup_frontend/clickup_frontend/node_modules/.pnpm/[email protected]/node_modules/piscina/src/index.ts:447
        assert.strictEqual(workerInfo.currentUsage(), 0);
               ^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
1 !== 0
    at Timeout._onTimeout (/home/runner/_work/clickup_frontend/clickup_frontend/node_modules/.pnpm/[email protected]/node_modules/piscina/src/index.ts:447:16)
    at listOnTimeout (node:internal/timers:588:17)
    at processTimers (node:internal/timers:523:7) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: 1,
  expected: 0,
  operator: 'strictEqual'
}

See: angular/angular-cli#30549

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