From 0a936d1831bbfeb93ca3f157c880bfed244cb2f0 Mon Sep 17 00:00:00 2001 From: Lam Wei Li Date: Mon, 25 Jul 2022 00:27:29 +0800 Subject: [PATCH] test: extended timeout interval for OS operations --- test/tap/fileAppender-test.js | 2 +- test/tap/multiprocess-shutdown-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tap/fileAppender-test.js b/test/tap/fileAppender-test.js index e7a79347..964942c8 100644 --- a/test/tap/fileAppender-test.js +++ b/test/tap/fileAppender-test.js @@ -151,7 +151,7 @@ test('log4js fileAppender', (batch) => { logger.info('This is an intermediate log message.'); logger.info('This is the second log message.'); // wait for the file system to catch up - await sleep(100); + await sleep(250); const fileContents = await fs.readFile(testFile, 'utf8'); t.match(fileContents, 'This is the second log message.'); t.equal(fileContents.indexOf('This is the first log message.'), -1); diff --git a/test/tap/multiprocess-shutdown-test.js b/test/tap/multiprocess-shutdown-test.js index e46fede7..e62cf765 100644 --- a/test/tap/multiprocess-shutdown-test.js +++ b/test/tap/multiprocess-shutdown-test.js @@ -4,7 +4,7 @@ const childProcess = require('child_process'); const sandbox = require('@log4js-node/sandboxed-module'); const log4js = require('../../lib/log4js'); -test('multiprocess appender shutdown (master)', { timeout: 5000 }, (t) => { +test('multiprocess appender shutdown (master)', { timeout: 10000 }, (t) => { log4js.configure({ appenders: { stdout: { type: 'stdout' },