Skip to content

Commit

Permalink
test: handle IPv6 localhost issues within tests
Browse files Browse the repository at this point in the history
The issue of hosts that do not resolve `localhost` to `::1` is now
handled within the tests. Remove flaky status for
test-https-connect-address-family and test-tls-connect-address-family.
  • Loading branch information
Trott committed Jul 16, 2016
1 parent 6510eb5 commit 94d2396
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 0 additions & 7 deletions test/parallel/parallel.status
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ test-tick-processor : PASS,FLAKY
[$system==linux]
test-tick-processor : PASS,FLAKY

# Flaky until https://github.com/nodejs/build/issues/415 is resolved.
# On some of the buildbots, AAAA queries for localhost don't resolve
# to an address and neither do any of the alternatives from the
# localIPv6Hosts list from test/common.js.
test-https-connect-address-family : PASS,FLAKY
test-tls-connect-address-family : PASS,FLAKY

[$system==macos]

[$system==solaris] # Also applies to SmartOS
Expand Down
7 changes: 6 additions & 1 deletion test/parallel/test-https-connect-address-family.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ function runTest() {
}

dns.lookup('localhost', {family: 6, all: true}, (err, addresses) => {
if (err)
if (err) {
if (err.code === 'ENOTFOUND') {
common.skip('localhost does not resolve to ::1');
return;
}
throw err;
}

if (addresses.some((val) => val.address === '::1'))
runTest();
Expand Down
7 changes: 6 additions & 1 deletion test/parallel/test-tls-connect-address-family.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ function runTest() {
}

dns.lookup('localhost', {family: 6, all: true}, (err, addresses) => {
if (err)
if (err) {
if (err.code === 'ENOTFOUND') {
common.skip('localhost does not resolve to ::1');
return;
}
throw err;
}

if (addresses.some((val) => val.address === '::1'))
runTest();
Expand Down

0 comments on commit 94d2396

Please sign in to comment.