Skip to content

Commit

Permalink
test: fix test-repl timeout and tmpdir refresh
Browse files Browse the repository at this point in the history
PR-URL: #25425
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
  • Loading branch information
mscdex authored and MylesBorins committed May 16, 2019
1 parent 5631d7a commit 3fcc44d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'use strict';
const common = require('../common');
const fixtures = require('../common/fixtures');
const tmpdir = require('../common/tmpdir');
const assert = require('assert');
const net = require('net');
const repl = require('repl');
Expand Down Expand Up @@ -823,6 +824,8 @@ function startUnixRepl() {
resolveReplServer(replServer);
}));

tmpdir.refresh();

server.listen(common.PIPE, common.mustCall(() => {
const client = net.createConnection(common.PIPE);

Expand Down Expand Up @@ -852,7 +855,7 @@ function event(ee, expected) {
const data = inspect(expected, { compact: false });
const msg = `The REPL did not reply as expected for:\n\n${data}`;
reject(new Error(msg));
}, 500);
}, common.platformTimeout(500));
ee.once('data', common.mustCall((...args) => {
clearTimeout(timeout);
resolve(...args);
Expand Down

0 comments on commit 3fcc44d

Please sign in to comment.