GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: elevate common http sequences to common by HarshithaKP · Pull Request #32766 · nodejs/node

Conversation

@HarshithaKP

@HarshithaKP HarshithaKP commented Apr 10, 2020

Copy link
Copy Markdown
Member

There are several instances of data download sequences in test
cases. Defined an abstraction for it in common module for easy
consumption.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@HarshithaKP
test: elevate common http sequences to common
fb5e7e4
There are several instances of data download  sequences in test
cases. Defined an abstraction for it in common module for easy
consumption.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to Node.js core tests and test infrastructure. label Apr 10, 2020
@HarshithaKP

HarshithaKP commented Apr 10, 2020

Copy link
Copy Markdown
Member Author

There are many test cases that will benefit from this, but I changed only one test case now, so that any feedback can be incroporated.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@addaleax

addaleax commented Apr 10, 2020

Copy link
Copy Markdown
Member

@HarshithaKP Did you see #31968? That PR does something similar, and there is some relevant discussion in it. I would not land this unless the people who object to it are okay with this PR.

Also, the particular example here doesn’t follow best practices – when a stream body is consumed by concatenating strings, you should always use .setEncoding() (usually .setEncoding('utf8')) to make sure that multi-byte characters are handled correctly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@HarshithaKP

HarshithaKP commented Apr 11, 2020

Copy link
Copy Markdown
Member Author

Thanks @addaleax, I did not know about that PR.

  • my changes are only very thin wrappers around 'data' and 'end' callbacks
  • my changes do not functionally alter anything, including setEncoding
  • its objective is to reduce repeated code sequences
  • it is comaprable with common.skip - hiding 2 calls that come together
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott
Trott requested changes Apr 13, 2020
View reviewed changes

@Trott Trott left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

If we add this, it will need to be documented in test/common/README.md.

receive() is an insufficiently descriptive name for the function if we're going to add it to common.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Trott

Trott commented Apr 13, 2020

Copy link
Copy Markdown
Member

If we add this, it will need to be documented in test/common/README.md.

receive() is an insufficiently descriptive name for the function if we're going to add it to common.

I don't want to seem like I'm moving the goalposts, so I'll add that I have other reasons I'm hesitant to land stuff like this. Those two things above are the ones I don't think anyone would disagree with. However, in general, I don't think we should be adding things to common unless the case for it is overwhelming. I don't think this meets that bar.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@HarshithaKP

HarshithaKP commented Apr 13, 2020

Copy link
Copy Markdown
Member Author

Closing based on feedback that add things to common only when the case is overwhelming.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@HarshithaKP HarshithaKP closed this Apr 13, 2020
This was referenced Aug 31, 2021
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 Dmarch28/node#31
Open
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#41
Open
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 meghasfdc/node#41
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 ron-a20/node#40
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 Rednickle/node-1#27
Open
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 baby636/node#16
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 sitedata/node#31
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 molllyn1/node#20
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 aliceUnhinged613/node#31
Open
This was referenced Sep 12, 2021
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 Dmarch28/node#35
Open
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 baby636/node#20
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 wedataintelligence/node#12
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 137717unity/node#35
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 ron-a20/node#44
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 Rednickle/node-1#30
Open
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 meghasfdc/node#44
Open
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#44
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 sitedata/node#35
Open
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 molllyn1/node#25
Open
[Snyk] Fix for 1 vulnerabilities baby636/node#22
Open
[Snyk] Fix for 1 vulnerabilities Dmarch28/node#37
Open
@137717unity 137717unity mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities 137717unity/node#122
Open
@baby636 baby636 mentioned this pull request Mar 22, 2024
[Snyk] Security upgrade gatsby from 2.24.27 to 3.13.0 baby636/node#136
Open
@kissofire kissofire mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities kissofire/node#124
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities aliceUnhinged613/node#123
Open
@ron-a20 ron-a20 mentioned this pull request Mar 22, 2024
[Snyk] Fix for 2 vulnerabilities ron-a20/node#121
Open
@wedataintelligence wedataintelligence mentioned this pull request Mar 23, 2024
[Snyk] Fix for 2 vulnerabilities wedataintelligence/node#105
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 13, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#127
Open
@molllyn1 molllyn1 mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities molllyn1/node#111
Open
@ron-a20 ron-a20 mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities ron-a20/node#126
Open
@kissofire kissofire mentioned this pull request May 13, 2024
[Snyk] Fix for 2 vulnerabilities kissofire/node#128
Open
@137717unity 137717unity mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities 137717unity/node#128
Open
@baby636 baby636 mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities baby636/node#149
Open
@wedataintelligence wedataintelligence mentioned this pull request May 14, 2024
[Snyk] Fix for 2 vulnerabilities wedataintelligence/node#111
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 15, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#129
Open
@kissofire kissofire mentioned this pull request May 20, 2024
[Snyk] Fix for 1 vulnerabilities kissofire/node#130
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities aliceUnhinged613/node#130
Open
@wedataintelligence wedataintelligence mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities wedataintelligence/node#112
Open
@137717unity 137717unity mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities 137717unity/node#129
Open
@molllyn1 molllyn1 mentioned this pull request May 21, 2024
[Snyk] Fix for 1 vulnerabilities molllyn1/node#113
Open
@ron-a20 ron-a20 mentioned this pull request May 22, 2024
[Snyk] Fix for 1 vulnerabilities ron-a20/node#127
Open
@wedataintelligence wedataintelligence mentioned this pull request Oct 9, 2024
[Snyk] Fix for 3 vulnerabilities wedataintelligence/node#127
Open
@ron-a20 ron-a20 mentioned this pull request Oct 9, 2024
[Snyk] Fix for 3 vulnerabilities ron-a20/node#142
Open
@aliceUnhinged613 aliceUnhinged613 mentioned this pull request Oct 11, 2024
[Snyk] Fix for 4 vulnerabilities aliceUnhinged613/node#146
Open
@137717unity 137717unity mentioned this pull request Oct 13, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 137717unity/node#145
Open
@kissofire kissofire mentioned this pull request Oct 13, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#147
Open
@137717unity 137717unity mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 137717unity/node#146
Open
@kissofire kissofire mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 kissofire/node#148
Open
@opekeye opekeye mentioned this pull request Oct 20, 2024
[Snyk] Security upgrade gatsby from 2.13.73 to 3.13.0 opekeye/node#17
Open
@molllyn1 molllyn1 mentioned this pull request Oct 22, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 molllyn1/node#131
Open
@wedataintelligence wedataintelligence mentioned this pull request Oct 22, 2024
[Snyk] Security upgrade gatsby from 2.18.18 to 3.13.0 wedataintelligence/node#129
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Trott Trott Trott requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@HarshithaKP @addaleax @Trott @nodejs-github-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.