Skip to content

test: copyedit test-tls-psk-alpn-callback-exception-handling#63485

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
aduh95:test-tls-psk-alpn-callback-exception-handling
Jul 15, 2026
Merged

test: copyedit test-tls-psk-alpn-callback-exception-handling#63485
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
aduh95:test-tls-psk-alpn-callback-exception-handling

Conversation

@aduh95

@aduh95 aduh95 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Make the assertions more intention revealing

@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 May 22, 2026
@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.22%. Comparing base (e7864e6) to head (8a1f4ec).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63485      +/-   ##
==========================================
- Coverage   90.24%   90.22%   -0.03%     
==========================================
  Files         741      741              
  Lines      241665   241665              
  Branches    45543    45538       -5     
==========================================
- Hits       218092   218043      -49     
- Misses      15105    15158      +53     
+ Partials     8468     8464       -4     

see 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aduh95 aduh95 requested a review from mcollina May 26, 2026 15:25
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label May 26, 2026
@aduh95 aduh95 requested a review from Renegade334 July 2, 2026 08:40
server.on('secureConnection', () => {
reject(new Error('secureConnection should not fire'));
});
server.on('secureConnection', common.mustNotCall('secureConnection listener'));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if this fires while promise is being awaited at the end of the test function, and tlsClientError doesn't fire? Seems like the event will be handled outside of the test's promise task, promise won't be resolved or rejected, and the test will hang until timeout?

@aduh95 aduh95 Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node/test/common/index.js

Lines 563 to 572 in 5922197

function mustNotCall(msg) {
const callSite = getCallSites()[1];
return function mustNotCall(...args) {
const argsInfo = args.length > 0 ?
`\ncalled with arguments: ${args.map((arg) => inspect(arg)).join(', ')}` : '';
assert.fail(
`${msg || 'function should not have been called'} at ${callSite.scriptName}:${callSite.lineNumber}` +
argsInfo);
};
}

It would throw an unhandled rejection which would terminate the process immediately
In any case, a pending promise is not enough to keep the process alive, so no the test won't hang

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 13, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@aduh95 aduh95 force-pushed the test-tls-psk-alpn-callback-exception-handling branch from da7d903 to 8a1f4ec Compare July 13, 2026 19:57
@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 Jul 13, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 13, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 15, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 15, 2026
@nodejs-github-bot nodejs-github-bot merged commit 824bc66 into nodejs:main Jul 15, 2026
74 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 824bc66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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