Browse Source

test: handle IPv6 localhost issues within tests

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.

PR-URL: https://github.com/nodejs/node/pull/7766
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v7.x
Rich Trott 9 years ago
parent
commit
814b8c3cf7
  1. 7
      test/parallel/parallel.status
  2. 7
      test/parallel/test-https-connect-address-family.js
  3. 7
      test/parallel/test-tls-connect-address-family.js

7
test/parallel/parallel.status

@ -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

7
test/parallel/test-https-connect-address-family.js

@ -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();

7
test/parallel/test-tls-connect-address-family.js

@ -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();

Loading…
Cancel
Save