From 59cc196e4b195c10ef5bf1f26a684c1f482f5bc1 Mon Sep 17 00:00:00 2001 From: Brian White Date: Wed, 9 Jan 2019 17:59:17 -0500 Subject: [PATCH] test: fix test-repl timeout and tmpdir refresh --- test/parallel/test-repl.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index 89370b0f7ad464..14ada1fe601cca 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -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'); @@ -823,6 +824,8 @@ function startUnixRepl() { resolveReplServer(replServer); })); + tmpdir.refresh(); + server.listen(common.PIPE, common.mustCall(() => { const client = net.createConnection(common.PIPE); @@ -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);