From 3711684ccf62a6eef4cbf82f943981edae8a0377 Mon Sep 17 00:00:00 2001 From: sujunfei Date: Sun, 28 Apr 2019 17:05:52 +0800 Subject: [PATCH] test: add mustCall for parallel/test-net-connect-paused-connection Add common.mustCall test on net.createServer callback and listen callback in the parallel/test-net-connect-paused-connection remove the mustCall of net.createServer callback PR-URL: https://github.com/nodejs/node/pull/27463 Reviewed-By: Yongsheng Zhang Reviewed-By: Weijia Wang Reviewed-By: Yorkie Liu Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Ouyang Yadong --- test/parallel/test-net-connect-paused-connection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-net-connect-paused-connection.js b/test/parallel/test-net-connect-paused-connection.js index a53177ed4c7e7e..801bba1cf5b2be 100644 --- a/test/parallel/test-net-connect-paused-connection.js +++ b/test/parallel/test-net-connect-paused-connection.js @@ -26,8 +26,8 @@ const net = require('net'); net.createServer(function(conn) { conn.unref(); -}).listen(0, function() { +}).listen(0, common.mustCall(function() { net.connect(this.address().port, 'localhost').pause(); setTimeout(common.mustNotCall('expected to exit'), 1000).unref(); -}).unref(); +})).unref();