From 3bc6f2a0835256892b087cf883125bd065450445 Mon Sep 17 00:00:00 2001 From: Marcus Scott Date: Tue, 16 Oct 2018 14:16:17 +0000 Subject: [PATCH 1/3] test: fix timeout in sequential/test-fs-watch-system-limit Timeout in this test can occur on Linux if machine is able to handle 200 child processes that are spawned. --- test/sequential/test-fs-watch-system-limit.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/sequential/test-fs-watch-system-limit.js b/test/sequential/test-fs-watch-system-limit.js index 8b9cb62ad0a007..318a6e74db8006 100644 --- a/test/sequential/test-fs-watch-system-limit.js +++ b/test/sequential/test-fs-watch-system-limit.js @@ -26,6 +26,7 @@ try { const processes = []; const gatherStderr = new stream.PassThrough(); +const timeout = 30000; gatherStderr.setEncoding('utf8'); gatherStderr.setMaxListeners(Infinity); @@ -51,6 +52,12 @@ function spawnProcesses() { spawnProcesses(); +setTimeout(() => { + if (!finished) { + gatherStderr.write('Error: Timeout'); + } +}, timeout); + let accumulated = ''; gatherStderr.on('data', common.mustCallAtLeast((chunk) => { accumulated += chunk; @@ -58,7 +65,8 @@ gatherStderr.on('data', common.mustCallAtLeast((chunk) => { assert( accumulated.includes('ENOSPC: System limit for number ' + 'of file watchers reached') || - accumulated.includes('EMFILE: '), + accumulated.includes('EMFILE: ') || + accumulated.includes('Timeout'), accumulated); console.log(`done after ${processes.length} processes, cleaning up`); finished = true; From 6ad1ce81d82e2bddefb275ff4df9f5991f2388a8 Mon Sep 17 00:00:00 2001 From: Marcus Scott Date: Thu, 25 Oct 2018 03:52:50 +0000 Subject: [PATCH 2/3] test: revert changes to test-fs-watch-system-limit --- test/sequential/test-fs-watch-system-limit.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/test/sequential/test-fs-watch-system-limit.js b/test/sequential/test-fs-watch-system-limit.js index 318a6e74db8006..8b9cb62ad0a007 100644 --- a/test/sequential/test-fs-watch-system-limit.js +++ b/test/sequential/test-fs-watch-system-limit.js @@ -26,7 +26,6 @@ try { const processes = []; const gatherStderr = new stream.PassThrough(); -const timeout = 30000; gatherStderr.setEncoding('utf8'); gatherStderr.setMaxListeners(Infinity); @@ -52,12 +51,6 @@ function spawnProcesses() { spawnProcesses(); -setTimeout(() => { - if (!finished) { - gatherStderr.write('Error: Timeout'); - } -}, timeout); - let accumulated = ''; gatherStderr.on('data', common.mustCallAtLeast((chunk) => { accumulated += chunk; @@ -65,8 +58,7 @@ gatherStderr.on('data', common.mustCallAtLeast((chunk) => { assert( accumulated.includes('ENOSPC: System limit for number ' + 'of file watchers reached') || - accumulated.includes('EMFILE: ') || - accumulated.includes('Timeout'), + accumulated.includes('EMFILE: '), accumulated); console.log(`done after ${processes.length} processes, cleaning up`); finished = true; From ed6c39407aef831cb338b7b31ac823146aba73a4 Mon Sep 17 00:00:00 2001 From: Marcus Scott Date: Thu, 25 Oct 2018 03:54:06 +0000 Subject: [PATCH 3/3] test: move test-fs-watch-system-limit from sequential to pummel --- test/{sequential => pummel}/test-fs-watch-system-limit.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{sequential => pummel}/test-fs-watch-system-limit.js (100%) diff --git a/test/sequential/test-fs-watch-system-limit.js b/test/pummel/test-fs-watch-system-limit.js similarity index 100% rename from test/sequential/test-fs-watch-system-limit.js rename to test/pummel/test-fs-watch-system-limit.js