diff --git a/test/parallel/test-child-process-stdio-big-write-end.js b/test/parallel/test-child-process-stdio-big-write-end.js index 6cc3d86644ac39..2d9234fd480085 100644 --- a/test/parallel/test-child-process-stdio-big-write-end.js +++ b/test/parallel/test-child-process-stdio-big-write-end.js @@ -22,7 +22,7 @@ 'use strict'; require('../common'); const assert = require('assert'); -const BUFSIZE = 1024; +let bufsize = 0; switch (process.argv[2]) { case undefined: @@ -51,14 +51,15 @@ function parent() { // Write until the buffer fills up. let buf; do { - buf = Buffer.alloc(BUFSIZE, '.'); - sent += BUFSIZE; + bufsize += 1024; + buf = Buffer.alloc(bufsize, '.'); + sent += bufsize; } while (child.stdin.write(buf)); // then write a bunch more times. for (let i = 0; i < 100; i++) { - const buf = Buffer.alloc(BUFSIZE, '.'); - sent += BUFSIZE; + const buf = Buffer.alloc(bufsize, '.'); + sent += bufsize; child.stdin.write(buf); }