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: refactor test-stream-big-push #10226

Closed
wants to merge 1 commit into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented Dec 11, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test stream

Description of change
  • use common.mustCall()
  • specify setTimeout() duration of 1ms
  • remove unused n function argument

* use common.mustCall()
* specify setTimeout() duration of 1ms
* remove unused `n` function argument
@Trott Trott added stream Issues and PRs related to the stream subsystem. test Issues and PRs related to the tests. labels Dec 11, 2016
@nodejs-github-bot nodejs-github-bot added dont-land-on-v7.x test Issues and PRs related to the tests. labels Dec 11, 2016
if (reads === 0) {
setTimeout(function() {
r.push(str);
});
}, 1);
Copy link
Member

Choose a reason for hiding this comment

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

Just wondering, why are we doing these?

Copy link
Member Author

Choose a reason for hiding this comment

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

Might just be me, but I find an unspecified duration or interval confusing. I always spend a moment wondering if it is a mistake. Did the original author simply forget to provide a value? Did they intend to use setImmediate() or even process.nextTick() instead of setTimeout()? And so on. By making it explicit, we at least make it clear that a 1ms timer is what was intended and not an error.

Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

LGTM

@italoacasas
Copy link
Contributor

@nodejs/streams

@italoacasas
Copy link
Contributor

@italoacasas
Copy link
Contributor

Landed b79e83e

CI issue is unrelated.

italoacasas pushed a commit that referenced this pull request Dec 14, 2016
* use common.mustCall()
* specify setTimeout() duration of 1ms
* remove unused `n` function argument

PR-URL: #10226
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 15, 2016
* use common.mustCall()
* specify setTimeout() duration of 1ms
* remove unused `n` function argument

PR-URL: #10226
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@italoacasas italoacasas mentioned this pull request Dec 15, 2016
MylesBorins pushed a commit that referenced this pull request Jan 22, 2017
* use common.mustCall()
* specify setTimeout() duration of 1ms
* remove unused `n` function argument

PR-URL: #10226
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* use common.mustCall()
* specify setTimeout() duration of 1ms
* remove unused `n` function argument

PR-URL: #10226
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
* use common.mustCall()
* specify setTimeout() duration of 1ms
* remove unused `n` function argument

PR-URL: #10226
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@Trott Trott deleted the big-push branch January 13, 2022 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stream Issues and PRs related to the stream subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants