Skip to content

Commit 0127c2b

Browse files
TrottMyles Borins
authored andcommitted
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: #5996Fixes: #5554 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 6052ced commit 0127c2b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎test/parallel/test-dns.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22
require('../common');
3-
varassert=require('assert');
3+
constassert=require('assert');
44

5-
vardns=require('dns');
5+
constdns=require('dns');
66

77
varexisting=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)