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

stream, test: add tests for 'readable' state machine #8683

Closed
mcollina opened this issue Sep 21, 2016 · 2 comments
Closed

stream, test: add tests for 'readable' state machine #8683

mcollina opened this issue Sep 21, 2016 · 2 comments
Assignees
Labels
good first issue Issues that are suitable for first-time contributors. stream Issues and PRs related to the stream subsystem. test Issues and PRs related to the tests.

Comments

@mcollina
Copy link
Member

Add test coverage for:

stream._readableState.needReadable
stream._readableState.emittedReadable
stream._readableState.readableListening
stream._readableState.resumeScheduled

this.needReadable = false;
this.emittedReadable = false;
this.readableListening = false;
this.resumeScheduled = false;

Those govern when and how we need to emit a 'readable' event and resume the flow.
The state machine is definitely complex, feel free to ask questions, and look hard at the source code. We can also add comments on the meaning of all those state variables.

Part of #8644.

cc @Fishrock123

@mcollina mcollina added stream Issues and PRs related to the stream subsystem. test Issues and PRs related to the tests. good first issue Issues that are suitable for first-time contributors. labels Sep 21, 2016
@sstern6
Copy link
Contributor

sstern6 commented Sep 24, 2016

@mcollina will get on this and let you know if I have any questions!!

Thanks

@italoacasas italoacasas self-assigned this Nov 21, 2016
Fishrock123 pushed a commit that referenced this issue Dec 13, 2016
PR-URL: #9864
Refs: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
italoacasas pushed a commit that referenced this issue Dec 16, 2016
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
mcollina pushed a commit that referenced this issue Dec 16, 2016
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
italoacasas pushed a commit that referenced this issue Dec 17, 2016
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
italoacasas pushed a commit that referenced this issue Dec 17, 2016
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
@italoacasas
Copy link
Contributor

This is done, closing

cjihrig pushed a commit to cjihrig/node that referenced this issue Dec 20, 2016
PR-URL: nodejs#10299
Ref: nodejs#8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
cjihrig pushed a commit that referenced this issue Dec 20, 2016
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
cjihrig pushed a commit that referenced this issue Dec 20, 2016
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
cjihrig pushed a commit that referenced this issue Dec 20, 2016
PR-URL: #10299
Ref: #8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 16, 2017
PR-URL: #9864
Refs: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 16, 2017
PR-URL: #9864
Refs: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
PR-URL: #10299
Ref: #8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
PR-URL: #10299
Ref: #8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 23, 2017
PR-URL: #10299
Ref: #8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
PR-URL: #9864
Refs: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
PR-URL: #10299
Ref: #8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
PR-URL: #9864
Refs: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
PR-URL: #10299
Ref: #8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 31, 2017
PR-URL: #9864
Refs: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 31, 2017
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 31, 2017
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
MylesBorins pushed a commit that referenced this issue Jan 31, 2017
PR-URL: #10299
Ref: #8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Feb 1, 2017
PR-URL: #9864
Refs: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Feb 1, 2017
Part of #8683, increase coverage of the internal
state machine of streams.

PR-URL: #10249
See: #8683
See: #10230
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
MylesBorins pushed a commit that referenced this issue Feb 1, 2017
PR-URL: #10241
Ref: #8683
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
MylesBorins pushed a commit that referenced this issue Feb 1, 2017
PR-URL: #10299
Ref: #8683
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are suitable for first-time contributors. stream Issues and PRs related to the stream subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

3 participants