-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 timing sensitivity in debugger test #11008
Conversation
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.
LGTM if CI is happy
@@ -4,6 +4,8 @@ const path = require('path'); | |||
const spawn = require('child_process').spawn; | |||
const assert = require('assert'); | |||
|
|||
const DELAY = 200; //ms. |
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 it worth wrapping this in common.platformTimeout
?
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.
Yep. Good idea.
@@ -21,12 +23,16 @@ proc.stderr.setEncoding('utf8'); | |||
|
|||
let stdout = ''; | |||
let stderr = ''; | |||
proc.stdout.on('data', (data) => stdout += data); | |||
proc.stderr.on('data', (data) => stderr += data); |
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 proc.stdout.setEncoding('utf-8')
would be good practice here (and the same for proc.stderr
)
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.
That's already there, a few lines above, unchanged by my patch.
test-debugger-util-regression.js was sensitive to timing, which seems to have changed enough with V8 5.7 to cause this test to fail. Fix the test to ensure we take debugger steps only at stable states instead of erroneously taking a step on a partially complete buffer. PR-URL: nodejs#11008 Reviewed-By: addaleax - Anna Henningsen <[email protected]>
ae684b1
to
8727dd8
Compare
test-debugger-util-regression.js was sensitive to timing, which seems to have changed enough with V8 5.7 to cause this test to fail. Fix the test to ensure we take debugger steps only at stable states instead of erroneously taking a step on a partially complete buffer. PR-URL: #11008 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 21b05cd |
test-debugger-util-regression.js was sensitive to timing, which seems to have changed enough with V8 5.7 to cause this test to fail. Fix the test to ensure we take debugger steps only at stable states instead of erroneously taking a step on a partially complete buffer. PR-URL: #11008 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
test-debugger-util-regression.js was sensitive to timing, which seems to have changed enough with V8 5.7 to cause this test to fail. Fix the test to ensure we take debugger steps only at stable states instead of erroneously taking a step on a partially complete buffer. PR-URL: nodejs#11008 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
test-debugger-util-regression.js was sensitive to timing, which seems to have changed enough with V8 5.7 to cause this test to fail. Fix the test to ensure we take debugger steps only at stable states instead of erroneously taking a step on a partially complete buffer. PR-URL: nodejs#11008 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
test-debugger-util-regression.js was sensitive to timing, which seems to have changed enough with V8 5.7 to cause this test to fail. Fix the test to ensure we take debugger steps only at stable states instead of erroneously taking a step on a partially complete buffer. PR-URL: #11008 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
test-debugger-util-regression.js was sensitive to timing, which seems to have changed enough with V8 5.7 to cause this test to fail. Fix the test to ensure we take debugger steps only at stable states instead of erroneously taking a step on a partially complete buffer. PR-URL: #11008 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
test-debugger-util-regression.js was sensitive to timing, which seems to have changed enough with V8 5.7 to cause this test to fail. Fix the test to ensure we take debugger steps only at stable states instead of erroneously taking a step on a partially complete buffer.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test