Skip to content

Conversation

@mcollina
Copy link
Member

Summary

  • Fix flaky test/fetch/encoding.js test that fails intermittently on macOS with ECONNRESET errors
  • Changed both after() hooks to call server.closeIdleConnections() before closing the server
  • This ensures idle connections are properly drained rather than abruptly terminated

Test plan

  • Ran encoding tests multiple times locally to verify stability
  • Linting passes

🤖 Generated with Claude Code

The test `should allow exactly 5 content-encodings` in
test/fetch/encoding.js was failing intermittently on macOS with
ECONNRESET errors due to improper connection cleanup.

Changed both `after()` hooks to call `server.closeIdleConnections()`
before closing the server, ensuring idle connections are properly
drained rather than abruptly terminated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.27%. Comparing base (4920fc4) to head (3f4ecdd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4763      +/-   ##
==========================================
+ Coverage   93.26%   93.27%   +0.01%     
==========================================
  Files         109      109              
  Lines       34029    34029              
==========================================
+ Hits        31738    31742       +4     
+ Misses       2291     2287       -4     

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

3 participants