test: add cache/dedupe + dns re-dispatch integration tests - #5535
Open
GiHoon1123 wants to merge 1 commit into
Open
test: add cache/dedupe + dns re-dispatch integration tests#5535GiHoon1123 wants to merge 1 commit into
GiHoon1123 wants to merge 1 commit into
Conversation
mcollina
reviewed
Jul 9, 2026
| return true | ||
| } | ||
|
|
||
| return Array.isArray(val) && val.every(v => typeof v === 'string') |
Member
There was a problem hiding this comment.
use a proper for loop, .every() is slow.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5535 +/- ##
=======================================
Coverage 93.44% 93.45%
=======================================
Files 110 110
Lines 37418 37418
=======================================
+ Hits 34967 34970 +3
+ Misses 2451 2448 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The underlying normalizeHeaders bug was fixed in nodejs#5536, which covers the flat-header handling with unit tests. These integration tests exercise the path the bug was actually reported through - a dns interceptor re-dispatch landing in a composed cache() (and deduplicate(), which shares the same cache-key utility) - so the compose-chain scenario stays covered end to end.
GiHoon1123
force-pushed
the
fix-issue-5522-normalize-headers-interceptor-order
branch
from
July 12, 2026 07:20
af670a2 to
00c975c
Compare
metcoder95
approved these changes
Jul 16, 2026
Contributor
Author
|
With #5536 now merged, I dropped the overlapping implementation changes from this PR and kept the integration The tests are passing, and this PR is ready for merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #5522.
#5536 contains the implementation fix and unit tests for flat header arrays. This PR keeps the integration coverage for the compose-chain paths that triggered the original bug.
The tests cover:
cache() + dns()after DNS re-dispatchdeduplicate() + dns(), which uses the same cache-key utilitiesThe earlier
lib/util/cache.jschanges were dropped after #5536 landed. This PR only changestest/interceptors/dns.js.node --test test/interceptors/dns.js: 29 passing, 0 failing (3 IPv6-conditional skips).