Skip to content

test: add unexpected disconnect guards to http2-body-delete.js - #5970

Merged
mcollina merged 2 commits into
nodejs:mainfrom
Kesavamoorthig06:test/h2-delete-disconnect-guards
Oct 14, 2026
Merged

mcollina merged 2 commits into
nodejs:mainfrom
Kesavamoorthig06:test/h2-delete-disconnect-guards

Conversation

@Kesavamoorthig06

@Kesavamoorthig06 Kesavamoorthig06 commented Oct 6, 2026 •

Copy link
Copy Markdown

This relates to...

Refs: #251

Rationale

The two successful HTTP/2 DELETE tests do not check for unexpected disconnects. A silent reconnect could hide a connection error.

Changes

Use the existing guardAgainstUnexpectedDisconnect helper in both tests, as test/http2-connection.js does. The helper ignores client shutdown and idle-socket timeouts.

No production code changes.

Status

Validation on Node.js v22.23.3:

  • node --test test/http2-body-delete.js test/h2-disconnect-guard.js: 5 passed, 0 failed.
  • npx --no-install eslint test/http2-body-delete.js: passed.
  • git diff --check: passed.
  • npm run test:h2:core: 120 passed, 1 failed. The failure is a Node.js onread->IsFunction() assertion in test/http2-request-never-settles.js; it also reproduces on the clean baseline with this patch removed.

@codecov-commenter

codecov-commenter commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.54%. Comparing base (e960331) to head (93b181f).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5970   +/-   ##
=======================================
  Coverage   91.53%   91.54%           
=======================================
  Files         113      113           
  Lines       43597    43597           
=======================================
+ Hits        39908    39911    +3     
+ Misses       3689     3686    -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@Kesavamoorthig06

Copy link
Copy Markdown
Author

The only failing jobs are Node 22 runs on test/http2-request-never-settles.js, which is unrelated to this change (+5 lines in test/http2-body-delete.js only). It's the Node 22 abort from nodejs/node#64850 (reproduces on clean baseline without this patch). Node 24/25 jobs pass.

@Kesavamoorthig06

Copy link
Copy Markdown
Author

Synced with main, including #5961's Node 22 skip. Fresh workflows are waiting for approval. Could you approve the runs and merge if the checks pass? Thanks.

@mcollina
mcollina merged commit e5966ab into nodejs:main Oct 14, 2026
38 checks passed
@Kesavamoorthig06
Kesavamoorthig06 deleted the test/h2-delete-disconnect-guards branch October 15, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants