Repository navigation
test/internet/test-dns-idna2008.js fails #48262
Copy link
Copy link
Closed
Labels
dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.
Description
Activity
I think this started failing on the daily CI on 11 May in https://ci.nodejs.org/view/Node.js%20Daily/job/node-daily-master/3042/
cc @nodejs/url
@ShogunPanda @targos I don't think this is related to
ada-url/idna. Previouslycareswas returningESERVFAILand right now it returnsENOTFOUND, and.errnoattribute is no longer returning anything.I've also added a test case to
ada-url/idnaas well.Here's the error message:
{ err: Error: queryA ENOTFOUND straße.de at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/callback_resolver:45:19) { errno: undefined, code: 'ENOTFOUND', syscall: 'queryA', hostname: 'straße.de' } }Here's the diff to pass the test case. I don't know if it's true.
diff --git a/test/internet/test-dns-idna2008.js b/test/internet/test-dns-idna2008.js index 16c8933073..fb93b7a97a 100644 --- a/test/internet/test-dns-idna2008.js +++ b/test/internet/test-dns-idna2008.js @@ -41,16 +41,16 @@ dns.promises.lookup(fixture.hostname, { family: fixture.family }) .then(({ address }) => { assert.strictEqual(address, fixture.expectedAddress); }, (err) => { - if (err && err.errno === 'ESERVFAIL') { - assert.ok(err.message.includes('queryA ESERVFAIL straße.de')); + if (err && err.code === 'ENOTFOUND') { + assert.ok(err.message.includes('queryA ENOTFOUND straße.de')); } else { throw err; } }).finally(mustCall()); dns.resolve4(fixture.hostname, mustCall((err, addresses) => { - if (err && err.errno === 'ESERVFAIL') { - assert.ok(err.message.includes('queryA ESERVFAIL straße.de')); + if (err && err.code === 'ENOTFOUND') { + assert.ok(err.message.includes('queryA ENOTFOUND straße.de')); return; } assert.ifError(err); @@ -61,8 +61,8 @@ const p = new dns.promises.Resolver().resolve4(fixture.hostname); p.then((addresses) => { assert.deepStrictEqual(addresses, [fixture.expectedAddress]); }, (err) => { - if (err && err.errno === 'ESERVFAIL') { - assert.ok(err.message.includes('queryA ESERVFAIL straße.de')); + if (err && err.code === 'ENOTFOUND') { + assert.ok(err.message.includes('queryA ENOTFOUND straße.de')); } else { throw err; }
- addeddnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.
on May 31, 2023
Metadata
Metadata
Assignees
Labels
dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.
Version
v20.2.0 and v21.0.0-pre
Platform
Darwin panda.local 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020 arm64
Subsystem
whatwg-url
What steps will reproduce the bug?
Run
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Test should pass
What do you see instead?
Additional information
Maybe related to #47920