Skip to content

Commit 001da4d

Browse files
authored
test: reduce memory usage of test-worker-stdio
On systems with limited memory and that are compiled with debugging information, this particular test is causing OOM condition especially as it is run in parallel. Even when run with a stripped binary as an input, the test consumes upward of 250M RSS. By limiting the input stream to the 1M, the stream is still buffering but memory consumption is similar to other parallel tests. PR-URL: #37769 Reviewed-By: Michael Dawson <[email protected]>
1 parent fd1e66f commit 001da4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-worker-stdio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (isMainThread) {
2727
const passed = new BufferingWritable();
2828

2929
const w = new Worker(__filename, { stdin: true, stdout: true });
30-
const source = fs.createReadStream(process.execPath);
30+
const source = fs.createReadStream(process.execPath, { end: 1_000_000 });
3131
source.pipe(w.stdin);
3232
source.pipe(original);
3333
w.stdout.pipe(passed);

0 commit comments

Comments
 (0)