node icon indicating copy to clipboard operation
node copied to clipboard

test: deflake `test-cluster-shared-handle-bind-privileged-port`

Open redyetidev opened this issue 4 months ago • 5 comments

On some Linux systems (not reproducible in CI, but reproducible locally), this test will fail because the port 42 is not priviledged. For example, on my Kali Linux installation:

└─$ out/Release/node test/parallel/test-cluster-shared-handle-bind-privileged-port.js
node:assert:137
  throw err;
  ^

AssertionError [ERR_ASSERTION]: listen should have failed at test/parallel/test-cluster-shared-handle-bind-privileged-port.js:51
    at Server.mustNotCall (test/common/index.js:557:12)
    at Object.onceWrapper (node:events:621:28)
    at Server.emit (node:events:519:35)
    at emitListeningNT (node:net:1948:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: undefined,
  expected: undefined,
  operator: 'fail'
}

Node.js v23.0.0-pre
node:assert:90
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

1 !== 0

    at Worker.<anonymous> (test/parallel/test-cluster-shared-handle-bind-privileged-port.js:47:12)
    at Worker.<anonymous> (test/common/index.js:491:15)
    at Worker.emit (node:events:507:28)
    at ChildProcess.<anonymous> (node:internal/cluster/primary:187:12)
    at Object.onceWrapper (node:events:622:26)
    at ChildProcess.emit (node:events:507:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: 1,
  expected: 0,
  operator: 'strictEqual'
}

Node.js v23.0.0-pre

redyetidev avatar Oct 13 '24 18:10 redyetidev