Skip to content

Commit 8d96300

Browse files
committedApr 4, 2016
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: nodejs#5996 Fixes: nodejs#5554 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent f739a12 commit 8d96300

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎test/parallel/test-dns.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22
require('../common');
3-
var assert = require('assert');
3+
const assert = require('assert');
44

5-
var dns = require('dns');
5+
const dns = require('dns');
66

77
var existing = dns.getServers();
88
assert(existing.length);
@@ -121,27 +121,27 @@ assert.doesNotThrow(function() {
121121
});
122122

123123
assert.doesNotThrow(function() {
124-
dns.lookup('www.google.com', {
124+
dns.lookup('', {
125125
family: 4,
126126
hints: 0
127127
}, noop);
128128
});
129129

130130
assert.doesNotThrow(function() {
131-
dns.lookup('www.google.com', {
131+
dns.lookup('', {
132132
family: 6,
133133
hints: dns.ADDRCONFIG
134134
}, noop);
135135
});
136136

137137
assert.doesNotThrow(function() {
138-
dns.lookup('www.google.com', {
138+
dns.lookup('', {
139139
hints: dns.V4MAPPED
140140
}, noop);
141141
});
142142

143143
assert.doesNotThrow(function() {
144-
dns.lookup('www.google.com', {
144+
dns.lookup('', {
145145
hints: dns.ADDRCONFIG | dns.V4MAPPED
146146
}, noop);
147147
});

0 commit comments

Comments
 (0)
Please sign in to comment.