Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 190c063

Browse filesBrowse files
Trottaddaleax
authored andcommitted
test: replace Google servers with localhost
Replace Google DNS servers with 127.0.0.1 in test-dns-setserver-when-querying. Refs: #25664 PR-URL: #25694 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 14bce1e commit 190c063
Copy full SHA for 190c063

File tree

Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-dns-setserver-when-querying.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-dns-setserver-when-querying.js
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ const common = require('../common');
44

55
const dns = require('dns');
66

7-
const goog = [
8-
'8.8.8.8',
9-
'8.8.4.4',
10-
];
7+
const localhost = [ '127.0.0.1' ];
118

129
{
1310
// Fix https://github.com/nodejs/node/issues/14734
@@ -16,7 +13,7 @@ const goog = [
1613
const resolver = new dns.Resolver();
1714
resolver.resolve('localhost', common.mustCall());
1815

19-
common.expectsError(resolver.setServers.bind(resolver, goog), {
16+
common.expectsError(resolver.setServers.bind(resolver, localhost), {
2017
code: 'ERR_DNS_SET_SERVERS_FAILED',
2118
message: /^c-ares failed to set servers: "There are pending queries\." \[.+\]$/g
2219
});
@@ -26,6 +23,6 @@ const goog = [
2623
dns.resolve('localhost', common.mustCall());
2724

2825
// should not throw
29-
dns.setServers(goog);
26+
dns.setServers(localhost);
3027
}
3128
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.