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

wrap_js_stream: adding test for readStop #16356

Closed
wants to merge 1 commit into from
Closed

wrap_js_stream: adding test for readStop #16356

wants to merge 1 commit into from

Conversation

akaila
Copy link
Contributor

@akaila akaila commented Oct 21, 2017

Adding a test for wrap_js_stream readStop method that was skipped in coverage

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

wrap_js_stream

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Oct 21, 2017
@mscdex mscdex added the tls Issues and PRs related to the tls subsystem. label Oct 21, 2017
Copy link
Member

@apapirovski apapirovski left a comment

Choose a reason for hiding this comment

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

LGTM just some minor nits

const fakeStreamObj = new FakeStream();
const wrappedStream = new WrappedStream(fakeStreamObj);

assert.strictEqual(fakeStreamObj.isPaused(), false, 'Resume by wrapped stream');
Copy link
Member

Choose a reason for hiding this comment

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

I feel like the assert message here and in all the other instances below might be more confusing than helpful. I would just remove them and have it be the default assertion message.

Instead, comments could be added to explain all the stages of this process and what exactly is being tested.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


require('../common');
const assert = require('assert');
const WrappedStream = require('internal/wrap_js_stream');
Copy link
Member

Choose a reason for hiding this comment

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

Could this be renamed to StreamWrap for consistency with the rest of the codebase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@apapirovski
Copy link
Member

apapirovski pushed a commit that referenced this pull request Oct 26, 2017
PR-URL: #16356
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@apapirovski
Copy link
Member

Landed in 9702ac5

Thanks for the contribution @akaila!

addaleax pushed a commit to ayojs/ayo that referenced this pull request Oct 26, 2017
PR-URL: nodejs/node#16356
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
PR-URL: #16356
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@gibfahn
Copy link
Member

gibfahn commented Oct 30, 2017

This is failing on v8.x-staging with:

Should this be backported to v8.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

Error: Cannot find module 'internal/wrap_js_stream'
    at Function.Module._resolveFilename (module.js:534:15)
    at Function.Module._load (module.js:464:25)
    at Module.require (module.js:577:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/gib/node/test/parallel/test-wrap-js-stream-read-stop.js:6:20)
    at Module._compile (module.js:633:30)
    at Object.Module._extensions..js (module.js:644:10)
    at Module.load (module.js:552:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:487:3)
Command: out/Release/node --expose-internals /home/gib/node/test/parallel/test-wrap-js-stream-read-stop.js
[01:47|% 100|+ 2024|-   3]: Done                                               
make: *** [test] Error 1

@addaleax
Copy link
Member

@gibfahn This depends on #16158, there is no point in a manual backport for this (but I can take a stab at the other PR)

@MylesBorins MylesBorins mentioned this pull request Oct 30, 2017
2 tasks
@akaila akaila deleted the test-stream branch October 30, 2017 23:21
gibfahn pushed a commit that referenced this pull request Nov 14, 2017
PR-URL: #16356
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@gibfahn gibfahn mentioned this pull request Nov 21, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
PR-URL: nodejs/node#16356
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants