From e9ece9181c8c8d82eb175f1c7f84425998f18160 Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Tue, 2 Jan 2018 12:09:45 -0500 Subject: [PATCH] test: fix flaky test-pipe-unref PR-URL: https://github.com/nodejs/node/pull/17950 Fixes: https://github.com/nodejs/node/issues/16875 Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- test/parallel/test-pipe-unref.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-pipe-unref.js b/test/parallel/test-pipe-unref.js index 17caa01ef0149d..cfe7a97ca59fd3 100644 --- a/test/parallel/test-pipe-unref.js +++ b/test/parallel/test-pipe-unref.js @@ -2,10 +2,10 @@ const common = require('../common'); const net = require('net'); +// This test should end immediately after `unref` is called + common.refreshTmpDir(); const s = net.Server(); s.listen(common.PIPE); s.unref(); - -setTimeout(common.mustNotCall(), 1000).unref();