Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test: improve error output of test-http2-client-promisify-connect-error #57135

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Feb 19, 2025

I'm getting a quite useless error output on Nix CI, showing there's a failed assertion but not showing the actual assertion error. Using assert.rejects should improve it greatly, and also makes the test code more readable.

For reference, the current output is:

not ok 1611 parallel/test-http2-client-promisify-connect-error
  ---
  duration_ms: 70.93100
  severity: fail
  exitcode: 1
  stack: |-
    node:internal/process/promises:394
        triggerUncaughtException(err, true /* fromPromise */);
        ^
    
    AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
    + actual - expected
    
    + 'ERR_ASSERTION'
    - 'ECONNREFUSED'
    
        at /build/node-v22.14.0/test/parallel/test-http2-client-promisify-connect-error.js:21:16
        at /build/node-v22.14.0/test/common/index.js:435:15
        at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
      generatedMessage: true,
      code: 'ERR_ASSERTION',
      actual: 'ERR_ASSERTION',
      expected: 'ECONNREFUSED',
      operator: 'strictEqual'
    }
    
    Node.js v22.14.0

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Feb 19, 2025
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.03%. Comparing base (baa60ce) to head (6a8c8ae).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57135      +/-   ##
==========================================
- Coverage   89.03%   89.03%   -0.01%     
==========================================
  Files         665      665              
  Lines      193408   193408              
  Branches    37279    37281       +2     
==========================================
- Hits       172206   172205       -1     
+ Misses      13886    13881       -5     
- Partials     7316     7322       +6     

see 28 files with indirect coverage changes

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Feb 19, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 19, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 19, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 21, 2025
@nodejs-github-bot nodejs-github-bot merged commit 8fc919d into nodejs:main Feb 21, 2025
70 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 8fc919d

@aduh95 aduh95 deleted the test-error-output branch February 21, 2025 15:57
acidiney pushed a commit to acidiney/node that referenced this pull request Feb 23, 2025
PR-URL: nodejs#57135
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Feb 24, 2025
PR-URL: #57135
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Feb 25, 2025
PR-URL: #57135
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants