Skip to content

Commit 1e0802e

Browse files
committed
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.
1 parent 3bba40a commit 1e0802e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-worker-stdio.js

+1-1
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)