Skip to content

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

Open
Kesavamoorthig06 wants to merge 2 commits into
nodejs:mainfrom
Kesavamoorthig06:test/h2-delete-disconnect-guards
Open

Kesavamoorthig06 wants to merge 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 86.92%. Comparing base (9ec5a2e) to head (592fac9).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5970      +/-   ##
==========================================
- Coverage   86.92%   86.92%   -0.01%     
==========================================
  Files         115      115              
  Lines       45749    45749              
==========================================
- Hits        39767    39766       -1     
- Misses       5982     5983       +1     

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

This branch has not been deployed

No deployments
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.

3 participants