Skip to content

Commit

Permalink
test: replace Google servers with localhost
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trott authored and BethGriggs committed Apr 16, 2019
1 parent 452b6aa commit 3fab8be
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/parallel/test-dns-setserver-when-querying.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ const common = require('../common');

const dns = require('dns');

const goog = [
'8.8.8.8',
'8.8.4.4',
];
const localhost = [ '127.0.0.1' ];

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

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

// should not throw
dns.setServers(goog);
dns.setServers(localhost);
}
}

0 comments on commit 3fab8be

Please sign in to comment.