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

http: Add coverage for socketOnDrain and updateOngoingData #17051

Closed
mcollina opened this issue Nov 15, 2017 · 6 comments
Closed

http: Add coverage for socketOnDrain and updateOngoingData #17051

mcollina opened this issue Nov 15, 2017 · 6 comments
Labels
http Issues or PRs related to the http subsystem. test Issues and PRs related to the tests.

Comments

@mcollina
Copy link
Member

mcollina commented Nov 15, 2017

Our current test suite does not cover

https://github.com/nodejs/node/blob/master/lib/_http_server.js#L381
https://github.com/nodejs/node/blob/master/lib/_http_server.js#L373

where the outgoingData is greater that the highWaterMark

  • Version: master
  • Platform: all
  • Subsystem: http
@mscdex mscdex added http Issues or PRs related to the http subsystem. test Issues and PRs related to the tests. labels Nov 15, 2017
@sashaaKr
Copy link

Hey, I'm going to work on it

@Leko
Copy link
Contributor

Leko commented Dec 11, 2017

@mcollina It seems to covered in latest coverage report.
https://coverage.nodejs.org/coverage-06e1b0386196f8f8/root/_http_server.js.html

But I cannot find test case about socketOnDrain.
This function is covered indirectly by another function tests.

$ git grep socketOnDrain
lib/_http_server.js:342:  state.onDrain = socketOnDrain.bind(undefined, socket, state);
lib/_http_server.js:377:    return socketOnDrain(socket, state);
lib/_http_server.js:381:function socketOnDrain(socket, state) {

Should we write a test according to socketOnDrain ?

@mcollina
Copy link
Member Author

our test suite does not check when needPause becomes false. We should test all the combinations for the various conditionals in socketOnDrain.

@Leko
Copy link
Contributor

Leko commented Dec 11, 2017

We should test all the combinations for the various conditionals in socketOnDrain.

@mcollina Thank you for the detailed explanation.
I got it. I'll try to write test.

@mcollina
Copy link
Member Author

Fixed in a364e7e.

@Leko
Copy link
Contributor

Leko commented Dec 15, 2017

Thank you for your quick response :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants