Skip to content

test: drain request bodies in request tests#5247

Open
trivikr wants to merge 1 commit intonodejs:mainfrom
trivikr:test-request
Open

test: drain request bodies in request tests#5247
trivikr wants to merge 1 commit intonodejs:mainfrom
trivikr:test-request

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 6, 2026

This relates to...

Fixes: #5227

Rationale

Some tests only awaited request() and asserted the status code, leaving response bodies unconsumed. That can keep sockets or async cleanup alive longer than the test body, which may contribute to intermittent file-level failures in CI.

Changes

Drains successful request() response bodies in test/request.js with body.dump().

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.27%. Comparing base (4f8f814) to head (1a85563).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5247   +/-   ##
=======================================
  Coverage   93.27%   93.27%           
=======================================
  Files         110      110           
  Lines       36366    36366           
=======================================
  Hits        33922    33922           
  Misses       2444     2444           

☔ View full report in Codecov by Sentry.
📢 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.

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.

[flaky] test\request.js

2 participants