summaryrefslogtreecommitdiff
path: root/test/async-hooks/test-tcpwrap.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-11-18 14:54:06 +0100
committerAnna Henningsen <anna@addaleax.net>2017-11-21 12:50:06 +0100
commit5d7f5c16b3ae49325b7bb0a79eaba3e945585ced (patch)
treeacca78da096b0ac5f645330399a7b0d2ef87d412 /test/async-hooks/test-tcpwrap.js
parent85f3e319c40dfe5b89d1f31a69ac8f3d9cf291b2 (diff)
downloadandroid-node-v8-5d7f5c16b3ae49325b7bb0a79eaba3e945585ced.tar.gz
android-node-v8-5d7f5c16b3ae49325b7bb0a79eaba3e945585ced.tar.bz2
android-node-v8-5d7f5c16b3ae49325b7bb0a79eaba3e945585ced.zip
src: remove async_hooks destroy timer handle
PR-URL: https://github.com/nodejs/node/pull/17117 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/async-hooks/test-tcpwrap.js')
-rw-r--r--test/async-hooks/test-tcpwrap.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/async-hooks/test-tcpwrap.js b/test/async-hooks/test-tcpwrap.js
index 1f4fc6af0d..4693e730bf 100644
--- a/test/async-hooks/test-tcpwrap.js
+++ b/test/async-hooks/test-tcpwrap.js
@@ -128,8 +128,10 @@ function onconnection(c) {
function onserverClosed() {
checkInvocations(tcp1, { init: 1, before: 1, after: 1, destroy: 1 },
'tcp1 when server is closed');
- checkInvocations(tcp2, { init: 1, before: 2, after: 2, destroy: 1 },
- 'tcp2 when server is closed');
+ setImmediate(() => {
+ checkInvocations(tcp2, { init: 1, before: 2, after: 2, destroy: 1 },
+ 'tcp2 after server is closed');
+ });
checkInvocations(tcp3, { init: 1, before: 1, after: 1 },
'tcp3 synchronously when server is closed');
tick(2, () => {