mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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: https://github.com/nodejs/node/pull/37769 Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
1 parent
619ac79abb
commit
fbce3178ba
1 file changed
+1
-1
@@ -27,7 +27,7 @@ if (isMainThread) {
|
||||
const passed = new BufferingWritable();
|
||||
|
||||
const w = new Worker(__filename, { stdin: true, stdout: true });
|
||||
const source = fs.createReadStream(process.execPath);
|
||||
const source = fs.createReadStream(process.execPath, { end: 1_000_000 });
|
||||
source.pipe(w.stdin);
|
||||
source.pipe(original);
|
||||
w.stdout.pipe(passed);
|
||||
|
||||
Reference in new issue
Block a user