Skip to content

Commit e9397d6

Browse files
AndreasMadsenevanlucas
authored andcommittedJan 31, 2018
async_hooks,test: only use IPv6 in http test
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. Backport-PR-URL: #18474 PR-URL: #18143 Fixes: #18003 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent ac2f98d commit e9397d6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
 

‎test/async-hooks/test-graph.http.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
'use strict';
22

33
const common = require('../common');
4+
if (!common.hasIPv6)
5+
common.skip('IPv6 support required');
6+
47
const initHooks = require('./init-hooks');
58
const verifyGraph = require('./verify-graph');
69
const http = require('http');
@@ -13,7 +16,11 @@ const server = http.createServer(common.mustCall(function(req, res) {
1316
this.close(common.mustCall());
1417
}));
1518
server.listen(0, common.mustCall(function() {
16-
http.get(`http://127.0.0.1:${server.address().port}`, common.mustCall());
19+
http.get({
20+
host: '::1',
21+
family: 6,
22+
port: server.address().port
23+
}, common.mustCall());
1724
}));
1825

1926
process.on('exit', function() {

0 commit comments

Comments
 (0)
Please sign in to comment.