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: rename regression tests with descriptive file names (pt. 3) #19275

Closed
wants to merge 1 commit into from

Conversation

ryzokuken
Copy link
Contributor

@ryzokuken ryzokuken commented Mar 10, 2018

Rename the tests appropriately alongside mentioning the subsystem
Also, make a few basic changes to make sure the tests conforms to the standard test structure

Refs: #19105
Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure

Checklist

  • test/parallel/test-regress-GH-4948.js
  • test/parallel/test-regress-GH-5051.js
  • test/parallel/test-regress-GH-5727.js
  • test/parallel/test-regress-GH-5927.js
  • test/parallel/test-regress-GH-6235.js
  • test/parallel/test-regress-GH-9819.js

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Mar 10, 2018
@BridgeAR
Copy link
Member

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 10, 2018
@@ -1,5 +1,10 @@
'use strict';
const common = require('../common');

// This test ensures that port numbers are validated in *all* kinds of `listen`
// calls. If an invalid port is supplied, ensures if a `RangeError` is thrown.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: spurious if before "a rangeError"?

require('../common');

// This test makes sure node doesn't crash when a request is sent and the
// connection is closed early due to `this.socket.parser` getting set to null
Copy link
Member

Choose a reason for hiding this comment

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

I'm struggling to understand this description and test. I think this is actually not testing anything as IncomingMessage.prototype._dump() no longer touches this.socket.parser.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. It no longer touches the value if it's null already. I'll try to improve this comment further.

@ryzokuken
Copy link
Contributor Author

@lpinca does the new description seem satisfactory? I tried improving it, let me know if it's better.

@lpinca
Copy link
Member

lpinca commented Mar 11, 2018

Yes, thanks. I think that test can be removed but it's probably better to discuss that in a separate and dedicated PR.

@ryzokuken
Copy link
Contributor Author

@lpinca Sure! Do you think I should make an issue for that?

@lpinca
Copy link
Member

lpinca commented Mar 11, 2018

@ryzokuken yes it makes sense. Opening a PR to start a discussion is also ok.

ryzokuken added a commit to ryzokuken/node that referenced this pull request Mar 11, 2018
lpinca pushed a commit that referenced this pull request Mar 13, 2018
PR-URL: #19279
Refs: #19275 (comment)
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@lpinca
Copy link
Member

lpinca commented Mar 13, 2018

@ryzokuken can you please remove d7a6757. I would also squash commits keeping only one and adding in the commit message something like this:

- Rename test-regress-GH-9819.js to test-crypto-tostring-segfault
- Rename test-regress-GH-5051.js to test-http-addrequest-localaddress
...

@ryzokuken
Copy link
Contributor Author

@lpinca I hope this is what you were asking for? I'm sorry it was my first-time cherrypicking commits. 😅

@lpinca
Copy link
Member

lpinca commented Mar 13, 2018

Yes, looks good, now if you can squash all of them into a single commit that would be great, otherwise we can do that before landing.

@lpinca
Copy link
Member

lpinca commented Mar 13, 2018

If you want to do that and need guidance let me know.

@ryzokuken
Copy link
Contributor Author

@lpinca thanks! I'll try it myself and bother you if I cannot manage to find a way to do it.

Rename the tests appropriately alongside mentioning the subsystem
Also, make a few basic changes to make sure the tests conform
to the standard test structure

- Rename test-regress-nodejsGH-9819 to test-crypto-tostring-segfault
- Rename test-regress-nodejsGH-5051 to test-http-addrequest-localaddress
- Rename test-regress-nodejsGH-5727 to test-net-listen-invalid-port
- Rename test-regress-nodejsGH-5927 to test-tty-stdin-pipe
- Rename test-regress-nodejsGH-6235 to test-v8-global-setter

Refs: nodejs#19105
Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure
@ryzokuken
Copy link
Contributor Author

@lpinca I hope it's good enough?

Gosh, people have been doing this for me all this time?

@lpinca
Copy link
Member

lpinca commented Mar 13, 2018

Looks great. Thank you.
Will land this after a final CI run.

CI: https://ci.nodejs.org/job/node-test-pull-request/13659/

@lpinca
Copy link
Member

lpinca commented Mar 13, 2018

Landed in 90b0538.

lpinca pushed a commit that referenced this pull request Mar 13, 2018
Rename the tests appropriately alongside mentioning the subsystem.
Also, make a few basic changes to make sure the tests conform to the
standard test structure.

- Rename test-regress-GH-9819 to test-crypto-tostring-segfault
- Rename test-regress-GH-5051 to test-http-addrequest-localaddress
- Rename test-regress-GH-5727 to test-net-listen-invalid-port
- Rename test-regress-GH-5927 to test-tty-stdin-pipe
- Rename test-regress-GH-6235 to test-v8-global-setter

PR-URL: #19275
Refs: #19105
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@lpinca lpinca closed this Mar 13, 2018
targos pushed a commit that referenced this pull request Mar 17, 2018
PR-URL: #19279
Refs: #19275 (comment)
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 20, 2018
PR-URL: #19279
Refs: #19275 (comment)
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 20, 2018
Rename the tests appropriately alongside mentioning the subsystem.
Also, make a few basic changes to make sure the tests conform to the
standard test structure.

- Rename test-regress-GH-9819 to test-crypto-tostring-segfault
- Rename test-regress-GH-5051 to test-http-addrequest-localaddress
- Rename test-regress-GH-5727 to test-net-listen-invalid-port
- Rename test-regress-GH-5927 to test-tty-stdin-pipe
- Rename test-regress-GH-6235 to test-v8-global-setter

PR-URL: #19275
Refs: #19105
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 20, 2018
Rename the tests appropriately alongside mentioning the subsystem.
Also, make a few basic changes to make sure the tests conform to the
standard test structure.

- Rename test-regress-GH-9819 to test-crypto-tostring-segfault
- Rename test-regress-GH-5051 to test-http-addrequest-localaddress
- Rename test-regress-GH-5727 to test-net-listen-invalid-port
- Rename test-regress-GH-5927 to test-tty-stdin-pipe
- Rename test-regress-GH-6235 to test-v8-global-setter

PR-URL: #19275
Refs: #19105
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos targos mentioned this pull request Mar 20, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
PR-URL: nodejs#19279
Refs: nodejs#19275 (comment)
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Rename the tests appropriately alongside mentioning the subsystem.
Also, make a few basic changes to make sure the tests conform to the
standard test structure.

- Rename test-regress-nodejsGH-9819 to test-crypto-tostring-segfault
- Rename test-regress-nodejsGH-5051 to test-http-addrequest-localaddress
- Rename test-regress-nodejsGH-5727 to test-net-listen-invalid-port
- Rename test-regress-nodejsGH-5927 to test-tty-stdin-pipe
- Rename test-regress-nodejsGH-6235 to test-v8-global-setter

PR-URL: nodejs#19275
Refs: nodejs#19105
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants