node icon indicating copy to clipboard operation
node copied to clipboard

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

Open avivkeller opened this issue 1 year 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

avivkeller avatar Oct 13 '24 18:10 avivkeller

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.41%. Comparing base (ac49b20) to head (4da9010). Report is 69 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #55378   +/-   ##
=======================================
  Coverage   88.41%   88.41%           
=======================================
  Files         652      652           
  Lines      186792   186878   +86     
  Branches    36052    36064   +12     
=======================================
+ Hits       165146   165235   +89     
+ Misses      14898    14889    -9     
- Partials     6748     6754    +6     

see 34 files with indirect coverage changes

codecov[bot] avatar Oct 13 '24 20:10 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/63098/

nodejs-github-bot avatar Oct 14 '24 17:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63114/

nodejs-github-bot avatar Oct 15 '24 13:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63143/

nodejs-github-bot avatar Oct 16 '24 17:10 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/63146/

nodejs-github-bot avatar Oct 16 '24 19:10 nodejs-github-bot

Commit Queue failed
- Loading data for nodejs/node/pull/55378
✔  Done loading data for nodejs/node/pull/55378
----------------------------------- PR info ------------------------------------
Title      test: deflake `test-cluster-shared-handle-bind-privileged-port` (#55378)
Author     Aviv Keller <[email protected]> (@RedYetiDev)
Branch     RedYetiDev:deflake-test-cluster-shared-handle -> nodejs:main
Labels     cluster, test, author ready, needs-ci, linux, commit-queue-squash
Commits    3
 - test: deflake `test-cluster-shared-handle-bind-privileged-port`
 - fixup! add comments
 - fixup! fixup! add comments
Committers 2
 - RedYetiDev <[email protected]>
 - GitHub <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/55378
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/55378
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last approving review:
   ⚠  - fixup! fixup! add comments
   ℹ  This PR was created on Sun, 13 Oct 2024 18:13:43 GMT
   ✔  Approvals: 3
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/55378#pullrequestreview-2364972050
   ✔  - Gireesh Punathil (@gireeshpunathil) (TSC): https://github.com/nodejs/node/pull/55378#pullrequestreview-2365220639
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/55378#pullrequestreview-2367305674
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2024-10-16T19:40:57Z: https://ci.nodejs.org/job/node-test-pull-request/63146/
- Querying data for job/node-test-pull-request/63146/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/11423871231

nodejs-github-bot avatar Oct 20 '24 05:10 nodejs-github-bot

Landed in d3526af7ff6c11cddc637d8c932a7481c1603a40

nodejs-github-bot avatar Oct 22 '24 04:10 nodejs-github-bot