From 3fab8be211c1a2cfd80f6a2aea0df02cff9f69dd Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 24 Jan 2019 21:54:32 -0800 Subject: [PATCH] test: replace Google servers with localhost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace Google DNS servers with 127.0.0.1 in test-dns-setserver-when-querying. Refs: https://github.com/nodejs/node/issues/25664 PR-URL: https://github.com/nodejs/node/pull/25694 Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson Reviewed-By: Khaidi Chu Reviewed-By: Luigi Pinca --- test/parallel/test-dns-setserver-when-querying.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-dns-setserver-when-querying.js b/test/parallel/test-dns-setserver-when-querying.js index 205a5b6c8585d0..12cb1a1ca2a869 100644 --- a/test/parallel/test-dns-setserver-when-querying.js +++ b/test/parallel/test-dns-setserver-when-querying.js @@ -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 @@ -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 }); @@ -26,6 +23,6 @@ const goog = [ dns.resolve('localhost', common.mustCall()); // should not throw - dns.setServers(goog); + dns.setServers(localhost); } }