Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: make stdout buffer test more robust #6633

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion test/known_issues/test-stdout-buffer-flush-on-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (process.argv[2] === 'child') {
process.exit();
}

[16, 18, 20].forEach((exponent) => {
[16, 18, 20, 21, 22].forEach((exponent) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be adding 22 and 24 to stay consistent here? or are 21 and 22 magic somehow?

Copy link
Member Author

Choose a reason for hiding this comment

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

22 is the biggest integer you can use before you start getting RangeError failures for Invalid string length.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, figured there was a reason

const bigNum = Math.pow(2, exponent);
const longLine = lineSeed.repeat(bigNum);
const cmd = `${process.execPath} ${__filename} child ${exponent} ${bigNum}`;
Expand Down