-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: fix unreliable known_issues test #6555
Conversation
LGTM |
1 similar comment
LGTM |
console.log(exponent); | ||
const longLine = lineSeed.repeat(Math.pow(2, exponent)); | ||
const cmd = `${process.execPath} ${__filename} child ${exponent}`; | ||
const stdout = execSync(cmd).toString().trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just calculate Math.pow(2, exponent)
once in the parent and pass it as argument to the child?
LGTM with a comment |
const cmd = `${process.execPath} ${__filename} child`; | ||
const stdout = execSync(cmd).toString().trim(); | ||
[16, 18, 20].forEach((exponent) => { | ||
console.log(exponent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the console.log()
needed, or can it be dropped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t know if it’s needed, but I’d like to have some way of knowing at what length the test failed after it has run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I accidentally left it in from debugging. I can add it to the assert message, perhaps.
LGTM with nits addressed. |
LGTM, maybe with @santigimeno’s nit addressed if that works too. |
Nits addressed. |
`test-stdout-buffer-flush-on-exit` was not failing reliably on POSIX machines and not failing at all on Windows. Revised test fails reliably on POSIX and is skipped (in CI) on Windows where the issue does not exist. Fixes: nodejs#6527
[16, 18, 20].forEach((exponent) => { | ||
const bigNum = Math.pow(2, exponent); | ||
const longLine = lineSeed.repeat(bigNum); | ||
const cmd = `${process.execPath} ${__filename} child ${exponent} ${bigNum}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the exponent
argument is not needed anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictly speaking, that's true, but I left it in for the assert message.
Still LGTM with one nit |
`test-stdout-buffer-flush-on-exit` was not failing reliably on POSIX machines and not failing at all on Windows. Revised test fails reliably on POSIX and is skipped (in CI) on Windows where the issue does not exist. Fixes: nodejs#6527 PR-URL: nodejs#6555 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joao Reis <reis@janeasystems.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Landed in c4006dd |
`test-stdout-buffer-flush-on-exit` was not failing reliably on POSIX machines and not failing at all on Windows. Revised test fails reliably on POSIX and is skipped (in CI) on Windows where the issue does not exist. Fixes: #6527 PR-URL: #6555 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joao Reis <reis@janeasystems.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
@Trott lts? |
@thealphanerd Yes |
`test-stdout-buffer-flush-on-exit` was not failing reliably on POSIX machines and not failing at all on Windows. Revised test fails reliably on POSIX and is skipped (in CI) on Windows where the issue does not exist. Fixes: #6527 PR-URL: #6555 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joao Reis <reis@janeasystems.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
`test-stdout-buffer-flush-on-exit` was not failing reliably on POSIX machines and not failing at all on Windows. Revised test fails reliably on POSIX and is skipped (in CI) on Windows where the issue does not exist. Fixes: #6527 PR-URL: #6555 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joao Reis <reis@janeasystems.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
`test-stdout-buffer-flush-on-exit` was not failing reliably on POSIX machines and not failing at all on Windows. Revised test fails reliably on POSIX and is skipped (in CI) on Windows where the issue does not exist. Fixes: #6527 PR-URL: #6555 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joao Reis <reis@janeasystems.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Checklist
Affected core subsystem(s)
test
Description of change
test-stdout-buffer-flush-on-exit
was not failing reliably on POSIXmachines and not failing at all on Windows. Revised test fails reliably
on POSIX and is skipped (in CI) on Windows where the issue does not
exist.
Fixes: #6527