test: fix flaky sequential/test-fs-watch-system-limit

This test has at least once locally received `EMFILE` rather
than `ENOSPC`, which also seems to provide a reasonable error
message (which is what the test ultimately checks).

PR-URL: https://github.com/nodejs/node/pull/23038
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Anna Henningsen authored and Michaël Zasso committed 2018-09-24 21:40:50 +02:00
1 parent b48dc0b667
commit 5d4bec3e0f
1 file changed
+2 -1
@@ -42,7 +42,8 @@ gatherStderr.on('data', common.mustCallAtLeast((chunk) => {
if (accumulated.includes('Error:') && !finished) {
assert(
accumulated.includes('ENOSPC: System limit for number ' +
'of file watchers reached'),
'of file watchers reached') ||
accumulated.includes('EMFILE: '),
accumulated);
console.log(`done after ${processes.length} processes, cleaning up`);
finished = true;