Skip to content

Commit

Permalink
async_hooks,test: only use IPv6 in http test
Browse files Browse the repository at this point in the history
If IPv6 is not supported on a machine, the IPv6 handle will first be
created, this will then fail and default to an IPv4 handle. This causes
the graph to change, as there now is an extra handle.

PR-URL: nodejs#18143
Backport-PR-URL: nodejs#18179
Fixes: nodejs#18003
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
AndreasMadsen authored and gibfahn committed Jan 17, 2018
1 parent 5dba883 commit cc7e20e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/async-hooks/test-graph.http.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
'use strict';

const common = require('../common');
if (!common.hasIPv6)
common.skip('IPv6 support required');

const initHooks = require('./init-hooks');
const verifyGraph = require('./verify-graph');
const http = require('http');
Expand All @@ -13,7 +16,11 @@ const server = http.createServer(common.mustCall(function(req, res) {
this.close(common.mustCall());
}));
server.listen(0, common.mustCall(function() {
http.get(`http://127.0.0.1:${server.address().port}`, common.mustCall());
http.get({
host: '::1',
family: 6,
port: server.address().port
}, common.mustCall());
}));

process.on('exit', function() {
Expand Down

0 comments on commit cc7e20e

Please sign in to comment.