summaryrefslogtreecommitdiff
path: root/test/async-hooks
diff options
context:
space:
mode:
authorAndreas Madsen <amwebdk@gmail.com>2018-01-14 11:09:24 +0100
committerAnatoli Papirovski <apapirovski@mac.com>2018-01-14 12:31:56 -0500
commitb12425d055f305a2b69fe925c38ef798aae4b0b2 (patch)
tree33ecf160390fdaca0551a3d5a983365bb608bc63 /test/async-hooks
parent8d043238dee18c7356f28133e1d353048a14c7ee (diff)
downloadandroid-node-v8-b12425d055f305a2b69fe925c38ef798aae4b0b2.tar.gz
android-node-v8-b12425d055f305a2b69fe925c38ef798aae4b0b2.tar.bz2
android-node-v8-b12425d055f305a2b69fe925c38ef798aae4b0b2.zip
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. PR-URL: https://github.com/nodejs/node/pull/18143 Fixes: https://github.com/nodejs/node/issues/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>
Diffstat (limited to 'test/async-hooks')
-rw-r--r--test/async-hooks/test-graph.http.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/async-hooks/test-graph.http.js b/test/async-hooks/test-graph.http.js
index 5c0c99f408..eea72ca3ba 100644
--- a/test/async-hooks/test-graph.http.js
+++ b/test/async-hooks/test-graph.http.js
@@ -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');
@@ -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() {