{{ message }}
test: add http agent to executionAsyncResource#34966
Merged
Merged
Conversation
Flarna
approved these changes
Aug 29, 2020
Member
addaleax
approved these changes
Sep 5, 2020
| server.listen(0, () => { | ||
| assert.strictEqual(executionAsyncResource(), hooked[executionAsyncId()]); | ||
|
|
||
| http.get({ agent, port: server.address().port }, () => { |
Member
There was a problem hiding this comment.
Can you wrap all the callbacks that are supposed to be called exactly once in common.mustCall(), i.e. the ones to http.createServer(), server.listen() and http.get()? That ensures that the assertions here are actually run, instead of the test just passing because something led to the callbacks not being called. (That’s probably not going to realistically happen because a ton of other tests would fail is these things were broken, but it’s a good practice to add those checks in our tests.)
This comment has been minimized.
This comment has been minimized.
Collaborator
Member
|
@psj-tar-gz Linter complains about a few findings. A rebase to current master is maybe also a good idea. |
Collaborator
4de4483 to
55f0830
Compare
Collaborator
Collaborator
Refs: https://github.com/nodejs/node/blob/HEAD/test/async-hooks/test-async-exec-resource-http.js Signed-off-by: psj-tar-gz <lyricalllmagical@gmail.com> PR-URL: nodejs#34966 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Contributor
targos
pushed a commit
that referenced
this pull request
May 11, 2024
Refs: https://github.com/nodejs/node/blob/HEAD/test/async-hooks/test-async-exec-resource-http.js Signed-off-by: psj-tar-gz <lyricalllmagical@gmail.com> PR-URL: #34966 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
marco-ippolito
pushed a commit
that referenced
this pull request
Jun 17, 2024
Refs: https://github.com/nodejs/node/blob/HEAD/test/async-hooks/test-async-exec-resource-http.js Signed-off-by: psj-tar-gz <lyricalllmagical@gmail.com> PR-URL: #34966 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Merged
marco-ippolito
pushed a commit
that referenced
this pull request
Jun 17, 2024
Refs: https://github.com/nodejs/node/blob/HEAD/test/async-hooks/test-async-exec-resource-http.js Signed-off-by: psj-tar-gz <lyricalllmagical@gmail.com> PR-URL: #34966 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
marco-ippolito
pushed a commit
that referenced
this pull request
Jun 17, 2024
Refs: https://github.com/nodejs/node/blob/HEAD/test/async-hooks/test-async-exec-resource-http.js Signed-off-by: psj-tar-gz <lyricalllmagical@gmail.com> PR-URL: #34966 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
soophoo
pushed a commit
to soophoo/node
that referenced
this pull request
Jun 20, 2024
Refs: https://github.com/nodejs/node/blob/HEAD/test/async-hooks/test-async-exec-resource-http.js Signed-off-by: psj-tar-gz <lyricalllmagical@gmail.com> PR-URL: nodejs#34966 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
bmeck
pushed a commit
to bmeck/node
that referenced
this pull request
Jun 22, 2024
Refs: https://github.com/nodejs/node/blob/HEAD/test/async-hooks/test-async-exec-resource-http.js Signed-off-by: psj-tar-gz <lyricalllmagical@gmail.com> PR-URL: nodejs#34966 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

I added a testcase about executionAsyncResource with Http Agent.
Refs: https://github.com/nodejs/node/blob/master/test/async-hooks/test-async-exec-resource-http.js
Signed-off-by: psj-tar-gz lyricalllmagical@gmail.com
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes