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 <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Anatoli Papirovski 2018-01-02 12:09:45 -05:00 committed by Ruben Bridgewater
parent 9cef060333
commit c043b82655
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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();