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: reach res._dump after abort ClientRequest #24191

Conversation

@tadhgcreedon
Copy link
Contributor

commented Nov 6, 2018

Adds test coverage to lib/_http_client.js by reaching a line of code inside a callback that gets registered on the 'response' event after aborting a client request, by emitting that event.

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

@tadhgcreedon tadhgcreedon force-pushed the tadhgcreedon:http-client-request-abort-response-dump branch from 73a1820 to 4359904 Nov 7, 2018

@addaleax

This comment has been minimized.

Copy link
Member

commented Nov 10, 2018

@tadhgcreedon I’m not sure, but would it maybe make sense to test both cases here, e.g. by creating a new test file rather than modifying an existing one? I think this might be affecting the previous functionality of the test…

(/cc @nodejs/http)

@jasnell

This comment has been minimized.

Copy link
Member

commented Nov 10, 2018

Yeah, a separate new test file may be better

@tadhgcreedon

This comment has been minimized.

Copy link
Contributor Author

commented Nov 11, 2018

Sure, makes sense. Will create a new test file then update.

@tadhgcreedon tadhgcreedon force-pushed the tadhgcreedon:http-client-request-abort-response-dump branch from 3179181 to 1a544be Nov 11, 2018

@oyyd
oyyd approved these changes Nov 13, 2018
@oyyd

This comment has been minimized.

@trivikr

This comment has been minimized.

Copy link
Member

commented Nov 13, 2018

Hi @tadhgcreedon, the author of the commits in this PR is not registered on GitHub (steps defined here)

Either:

  • add the email ID associated with the commit to GitHub
  • change the author of the commit to current email ID registered with the GitHub by following these steps

@tadhgcreedon tadhgcreedon force-pushed the tadhgcreedon:http-client-request-abort-response-dump branch from 1a544be to c37a91d Nov 13, 2018

@Trott

This comment has been minimized.

@oyyd

This comment has been minimized.

@Trott

This comment has been minimized.

Copy link
Member

commented Nov 14, 2018

@addaleax LGTY?


req.end();
req.abort();
req.abort();

This comment has been minimized.

Copy link
@thefourtheye

thefourtheye Nov 20, 2018

Contributor

Havn't checked this completely, but two req.aborts are intentional?

This comment has been minimized.

Copy link
@Trott

Trott Nov 22, 2018

Member

/ping @tadhgcreedon Two abort() calls like that are intentional? If so, great. If not, can you remove one? Or I can totally remove one. Either way. I just want to see this get merged....

@Trott

This comment has been minimized.

@Trott
Trott approved these changes Nov 28, 2018
@Trott

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

Trott added a commit to Trott/io.js that referenced this pull request Nov 29, 2018
test: reach res._dump after abort ClientRequest
PR-URL: nodejs#24191
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

Landed in f5b8853.

Thanks for the contribution! 🎉

(If you're interested in other possible contributions to Node.js but don't have a good idea of where to start looking, some ideas are posted at https://www.nodetodo.org/next-steps/.)

@Trott Trott closed this Nov 29, 2018

targos added a commit that referenced this pull request Nov 29, 2018
test: reach res._dump after abort ClientRequest
PR-URL: #24191
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@BridgeAR BridgeAR referenced this pull request Dec 5, 2018
4 of 4 tasks complete
refack added a commit to refack/node that referenced this pull request Jan 14, 2019
test: reach res._dump after abort ClientRequest
PR-URL: nodejs#24191
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BethGriggs added a commit that referenced this pull request Feb 12, 2019
test: reach res._dump after abort ClientRequest
PR-URL: #24191
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@BethGriggs BethGriggs referenced this pull request Feb 12, 2019
rvagg added a commit that referenced this pull request Feb 28, 2019
test: reach res._dump after abort ClientRequest
PR-URL: #24191
Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.