-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 flaky test-force-repl #8484
Conversation
Increase time allowed for startup from 1 second to 5 seconds to avoid occasional flakiness. While at it, refactor a few minor things such as var->const and using common.mustCall(). Fixes: nodejs#8483
Stress test on master: https://ci.nodejs.org/job/node-stress-single-test/906/nodes=win10/console Stress test with this change: https://ci.nodejs.org/job/node-stress-single-test/907/nodes=win10/console EDIT: Well those are not the results I expected... |
|
||
cp.stdout.setEncoding('utf8'); | ||
|
||
cp.stdout.once('data', function(b) { | ||
cp.stdout.once('dasta', common.mustCall(function(b) { |
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.
dasta?
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.
Ha! I added that to make sure the test fails if the callback never fired but then checked it in that way by accident.
Let's try again: master: https://ci.nodejs.org/job/node-stress-single-test/908/nodes=win10-1p/console this branch: https://ci.nodejs.org/job/node-stress-single-test/909/nodes=win10-1p/console |
|
||
cp.stdout.setEncoding('utf8'); | ||
|
||
cp.stdout.once('data', function(b) { | ||
cp.stdout.once('data', common.mustCall(function(b) { | ||
clearTimeout(timeoutId); | ||
assert.equal(b, '> '); |
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.
If you’re refactoring this anyway you might as well use strictEqual
here :)
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.
If you’re refactoring this anyway you might as well use strictEqual here :)
Hey, shame on me. Yeah, I'll change equal()
-> strictEqual()
.
I’d be curious how well this test does with no timeout at all… is there a specific reason this test has one? |
The timeout is there to facilitate running it on the command line without the |
LGTM. |
LGTM |
Increase time allowed for startup from 1 second to 5 seconds to avoid occasional flakiness. While at it, refactor a few minor things such as var->const and using common.mustCall(). Fixes: nodejs#8483 PR-URL: nodejs#8484 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in ad1a9dd |
Increase time allowed for startup from 1 second to 5 seconds to avoid occasional flakiness. While at it, refactor a few minor things such as var->const and using common.mustCall(). Fixes: #8483 PR-URL: #8484 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
Increase time allowed for startup from 1 second to 5 seconds to avoid occasional flakiness. While at it, refactor a few minor things such as var->const and using common.mustCall(). Fixes: #8483 PR-URL: #8484 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
Increase time allowed for startup from 1 second to 5 seconds to avoid occasional flakiness. While at it, refactor a few minor things such as var->const and using common.mustCall(). Fixes: #8483 PR-URL: #8484 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
Increase time allowed for startup from 1 second to 5 seconds to avoid occasional flakiness. While at it, refactor a few minor things such as var->const and using common.mustCall(). Fixes: #8483 PR-URL: #8484 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
Increase time allowed for startup from 1 second to 5 seconds to avoid occasional flakiness. While at it, refactor a few minor things such as var->const and using common.mustCall(). Fixes: #8483 PR-URL: #8484 Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test repl
Description of change
Increase time allowed for startup from 1 second to 5 seconds to avoid
occasional flakiness. While at it, refactor a few minor things such as
var->const and using common.mustCall().
Fixes: #8483