From ccf90b651a9a042c714f5859032898a2a1997e99 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 1 Apr 2016 06:38:00 -0700 Subject: [PATCH] test: fix test-dns.js flakiness Use empty string instead of `www.google.com` for tests where we are just doing parameter evaluation. This will avoid DNS lookups which appear to be causing flakiness on Raspberry Pi devices in CI. PR-URL: https://github.com/nodejs/node/pull/5996 Fixes: https://github.com/nodejs/node/issues/5554 Reviewed-By: Michael Dawson Reviewed-By: Colin Ihrig --- test/parallel/test-dns.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js index 0426490..9a2577e 100644 --- a/test/parallel/test-dns.js +++ b/test/parallel/test-dns.js @@ -1,8 +1,8 @@ 'use strict'; require('../common'); -var assert = require('assert'); +const assert = require('assert'); -var dns = require('dns'); +const dns = require('dns'); var existing = dns.getServers(); assert(existing.length); @@ -121,27 +121,27 @@ assert.doesNotThrow(function() { }); assert.doesNotThrow(function() { - dns.lookup('www.google.com', { + dns.lookup('', { family: 4, hints: 0 }, noop); }); assert.doesNotThrow(function() { - dns.lookup('www.google.com', { + dns.lookup('', { family: 6, hints: dns.ADDRCONFIG }, noop); }); assert.doesNotThrow(function() { - dns.lookup('www.google.com', { + dns.lookup('', { hints: dns.V4MAPPED }, noop); }); assert.doesNotThrow(function() { - dns.lookup('www.google.com', { + dns.lookup('', { hints: dns.ADDRCONFIG | dns.V4MAPPED }, noop); }); -- 2.7.4