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 <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
f739a1222f
commit
8d96300c22
@ -1,8 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
require('../common');
|
require('../common');
|
||||||
var assert = require('assert');
|
const assert = require('assert');
|
||||||
|
|
||||||
var dns = require('dns');
|
const dns = require('dns');
|
||||||
|
|
||||||
var existing = dns.getServers();
|
var existing = dns.getServers();
|
||||||
assert(existing.length);
|
assert(existing.length);
|
||||||
@ -121,27 +121,27 @@ assert.doesNotThrow(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
assert.doesNotThrow(function() {
|
assert.doesNotThrow(function() {
|
||||||
dns.lookup('www.google.com', {
|
dns.lookup('', {
|
||||||
family: 4,
|
family: 4,
|
||||||
hints: 0
|
hints: 0
|
||||||
}, noop);
|
}, noop);
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.doesNotThrow(function() {
|
assert.doesNotThrow(function() {
|
||||||
dns.lookup('www.google.com', {
|
dns.lookup('', {
|
||||||
family: 6,
|
family: 6,
|
||||||
hints: dns.ADDRCONFIG
|
hints: dns.ADDRCONFIG
|
||||||
}, noop);
|
}, noop);
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.doesNotThrow(function() {
|
assert.doesNotThrow(function() {
|
||||||
dns.lookup('www.google.com', {
|
dns.lookup('', {
|
||||||
hints: dns.V4MAPPED
|
hints: dns.V4MAPPED
|
||||||
}, noop);
|
}, noop);
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.doesNotThrow(function() {
|
assert.doesNotThrow(function() {
|
||||||
dns.lookup('www.google.com', {
|
dns.lookup('', {
|
||||||
hints: dns.ADDRCONFIG | dns.V4MAPPED
|
hints: dns.ADDRCONFIG | dns.V4MAPPED
|
||||||
}, noop);
|
}, noop);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user