Skip to content

Commit

Permalink
dns: fix test suite, part 1
Browse files Browse the repository at this point in the history
PR-URL: #39987
Fixes: #31566
Refs: #6307
Refs: #20710
Refs: #38099
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
treysis authored and nodejs-github-bot committed Sep 12, 2021
1 parent 1e2a649 commit 9da76fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/common/inspector-helper.js
Expand Up @@ -392,7 +392,7 @@ class NodeInstance extends EventEmitter {
console.log('[test]', `Testing ${path}`);
const headers = hostHeaderValue ? { 'Host': hostHeaderValue } : null;
return this.portPromise.then((port) => new Promise((resolve, reject) => {
const req = http.get({ host, port, path, headers }, (res) => {
const req = http.get({ host, port, family: 4, path, headers }, (res) => {
let response = '';
res.setEncoding('utf8');
res
Expand All @@ -418,6 +418,7 @@ class NodeInstance extends EventEmitter {
const port = await this.portPromise;
return http.get({
port,
family: 4,
path: parseURL(devtoolsUrl).path,
headers: {
'Connection': 'Upgrade',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-message.js
Expand Up @@ -60,7 +60,7 @@ if (cluster.isWorker) {
maybeReply();
});

server.listen(0, '127.0.0.1');
server.listen(0);
} else if (cluster.isPrimary) {

const checks = {
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-https-connect-localport.js
Expand Up @@ -23,7 +23,7 @@ const assert = require('assert');
host: 'localhost',
pathname: '/',
port,
family: 4,
//family: 4,
localPort: common.PORT,
rejectUnauthorized: false,
}, common.mustCall(() => {
Expand Down
2 changes: 2 additions & 0 deletions test/sequential/test-net-connect-local-error.js
Expand Up @@ -9,12 +9,14 @@ const expectedErrorCodes = ['ECONNREFUSED', 'EADDRINUSE'];

const optionsIPv4 = {
port: common.PORT,
family: 4,
localPort: common.PORT + 1,
localAddress: common.localhostIPv4
};

const optionsIPv6 = {
host: '::1',
family: 6,
port: common.PORT + 2,
localPort: common.PORT + 3,
localAddress: '::1',
Expand Down

0 comments on commit 9da76fd

Please sign in to comment.