Skip to content

Commit

Permalink
test: fix test-dns.js flakiness
Browse files Browse the repository at this point in the history
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: #5996
Fixes: #5554
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Trott authored and Myles Borins committed Apr 11, 2016
1 parent 6f0bd64 commit ccf90b6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-dns.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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);
});
Expand Down

0 comments on commit ccf90b6

Please sign in to comment.