-
Notifications
You must be signed in to change notification settings - Fork 31.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: remove unused config #21985
test: remove unused config #21985
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,13 @@ | |
'use strict'; | ||
const common = require('../common'); | ||
const Readable = require('stream').Readable; | ||
|
||
// This tests synchronous read callbacks and verifies that even if they nest | ||
// heavily the process handles it without an error | ||
|
||
const r = new Readable(); | ||
const N = 256 * 1024; | ||
|
||
// Go ahead and allow the pathological case for this test. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please keep (maybe move to L24 as per https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It no longer allows the pathological use case though since maxTickDepth was removed so the comment is incorrect (and has been since 0.12). Is there alternative phrasing you'd prefer? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not associate the comment specifically with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @refack the test verifies the behaviour of a synchronous |
||
// Yes, it's an infinite loop, that's the point. | ||
process.maxTickDepth = N + 2; | ||
|
||
let reads = 0; | ||
r._read = function(n) { | ||
const chunk = reads++ === N ? null : Buffer.allocUnsafe(1); | ||
|
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.
Could we keep the test description (these 3 lines)
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.
Sure, can revert this - though I didn't find it very informative if you do I'll revert.
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'll revert except the third line