Skip to content

Conversation

edsadr
Copy link
Member

@edsadr edsadr commented Dec 26, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change
  • use const and let instead of var
  • use common.mustCall to control functions executions
  • use assert.strictEqual instead of assert.equal
  • use arrow functions

@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. lts-watch-v6.x labels Dec 26, 2016
@lpinca lpinca added the http Issues or PRs related to the http subsystem. label Dec 26, 2016
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what exactly this tests.

Copy link
Member Author

@edsadr edsadr Dec 27, 2016

Choose a reason for hiding this comment

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

@thefourtheye as I see it, this is testing this code: https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js#L255-L279 , so Connection: close should be in the resp and as the comment there says : // Make sure we don't end the 0\r\n\r\n at the end of the message.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps add that information as a comment to the test?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not a big fan of nesting functions unless it is unavoidable. Now that we have common.mustCall to ensure that assertions will happen for sure, why don't we refactor this to sequential calls?

@edsadr
Copy link
Member Author

edsadr commented Dec 27, 2016

@Trott Added the comments clarifying the assertions, @thefourtheye changed the nested functions to run in parallel

@italoacasas
Copy link

Copy link
Member

Choose a reason for hiding this comment

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

Totally unimportant nit that should not stop this from landing but if you want to fix it up, go for it:

don't -> doesn't

@edsadr
Copy link
Member Author

edsadr commented Dec 28, 2016

@Trott , sorry about that... just fixed it 🙂

@thefourtheye
Copy link
Contributor

I think there is a git commit problem. I see two changed files.

@edsadr
Copy link
Member Author

edsadr commented Dec 28, 2016

@thefourtheye you are right, sorry about that handling too many branches and I made a mistake, just fixed it...

Copy link
Contributor

@thefourtheye thefourtheye left a comment

Choose a reason for hiding this comment

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

@lpinca
Copy link
Member

lpinca commented Jan 7, 2017

Copy link
Member

Choose a reason for hiding this comment

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

Linter is not happy with this indentation.

* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions
var conn = net.createConnection(this.address().port, function() {
conn.write('GET / HTTP/1.1\r\n\r\n');
server.listen(0, common.mustCall(() => {
const conn = net.createConnection(
Copy link
Member Author

Choose a reason for hiding this comment

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

@lpinca didn't get an error before with make -j8 lint, but changed it this way to make it look better, same.. no error with make -j8 lint, let me know if this way works or if not please provide an example and will make it fit

Copy link
Member

Choose a reason for hiding this comment

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

It works now, thanks.

@lpinca
Copy link
Member

lpinca commented Jan 7, 2017

@lpinca
Copy link
Member

lpinca commented Jan 7, 2017

Landed in f895715.

@lpinca lpinca closed this Jan 7, 2017
lpinca pushed a commit that referenced this pull request Jan 7, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: #10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: nodejs#10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 19, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: nodejs#10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 25, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: nodejs#10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: nodejs#10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@italoacasas italoacasas mentioned this pull request Jan 29, 2017
MylesBorins pushed a commit that referenced this pull request Mar 8, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: #10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 8, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: #10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: #10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
* change the nested functions call to run tests in parallel
* use const and let instead of var
* use common.mustCall to control functions execution
* use assert.strictEqual instead of assert.equal
* use arrow functions

PR-URL: #10462
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
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 this pull request may close these issues.

10 participants