Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions test/parallel/test-child-process-stdio-big-write-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'use strict';
require('../common');
const assert = require('assert');
const BUFSIZE = 1024;
let bufsize = 0;

switch (process.argv[2]) {
case undefined:
Expand Down Expand Up @@ -51,14 +51,15 @@ function parent() {
// Write until the buffer fills up.
let buf;
do {
buf = Buffer.alloc(BUFSIZE, '.');
sent += BUFSIZE;
bufsize += 1024;
Copy link
Contributor

@refack refack Jun 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it definitely looks like a /pummel/...
But:

ok 184 parallel/test-child-process-stdio-big-write-end
  ---
  duration_ms: 0.332

🤷‍♂️

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);
}

Expand Down