aboutsummaryrefslogtreecommitdiff
path: root/test/parallel
diff options
context:
space:
mode:
authorAndreas Madsen <amwebdk@gmail.com>2017-11-12 18:46:55 +0100
committerAndreas Madsen <amwebdk@gmail.com>2017-11-20 12:03:06 +0100
commit07a4fa3dbefdc7f740a5a281f713998e71aab8f3 (patch)
tree9715e5f5f82336525a4290d8fb605fde32b1513d /test/parallel
parent97ba69f91543f89d389a4f3fef57c5c6c734df34 (diff)
downloadandroid-node-v8-07a4fa3dbefdc7f740a5a281f713998e71aab8f3.tar.gz
android-node-v8-07a4fa3dbefdc7f740a5a281f713998e71aab8f3.tar.bz2
android-node-v8-07a4fa3dbefdc7f740a5a281f713998e71aab8f3.zip
async_hooks: deprecate undocumented API
PR-URL: https://github.com/nodejs/node/pull/16972 Refs: https://github.com/nodejs/node/issues/14328 Refs: https://github.com/nodejs/node/issues/15572 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel')
-rw-r--r--test/parallel/test-async-hooks-run-in-async-id-scope.js2
-rw-r--r--test/parallel/test-http-client-immediate-error.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-async-hooks-run-in-async-id-scope.js b/test/parallel/test-async-hooks-run-in-async-id-scope.js
index 8cef7d214c..14d1c7423f 100644
--- a/test/parallel/test-async-hooks-run-in-async-id-scope.js
+++ b/test/parallel/test-async-hooks-run-in-async-id-scope.js
@@ -4,7 +4,7 @@ const common = require('../common');
const assert = require('assert');
const async_hooks = require('async_hooks');
-const asyncId = async_hooks.newUid();
+const asyncId = new async_hooks.AsyncResource('test').asyncId();
assert.notStrictEqual(async_hooks.executionAsyncId(), asyncId);
diff --git a/test/parallel/test-http-client-immediate-error.js b/test/parallel/test-http-client-immediate-error.js
index 6b9cacb256..abbf5c41fc 100644
--- a/test/parallel/test-http-client-immediate-error.js
+++ b/test/parallel/test-http-client-immediate-error.js
@@ -1,4 +1,5 @@
'use strict';
+// Flags: --expose-internals
// Make sure http.request() can catch immediate errors in
// net.createConnection().
@@ -9,7 +10,7 @@ const net = require('net');
const http = require('http');
const uv = process.binding('uv');
const { async_id_symbol } = process.binding('async_wrap');
-const { newUid } = require('async_hooks');
+const { newUid } = require('internal/async_hooks');
const agent = new http.Agent();
agent.createConnection = common.mustCall((cfg) => {