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: Refactor test-http2-compat-serverresponse-finished.js by antsmartian · Pull Request #21929 · nodejs/node

Conversation

@antsmartian

@antsmartian antsmartian commented Jul 22, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Just a simple refactor change:

  1. Changed from strictEqual to assert.ok where I left its needed.
  2. Arrow functions.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

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

All reactions
lpinca
lpinca reviewed Jul 22, 2018
View reviewed changes
Comment thread test/parallel/test-http2-compat-serverresponse-finished.js Outdated

@lpinca lpinca Jul 22, 2018 •
edited
Loading

Uh oh!

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

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.

I see this kind of change being done frequently recently and I think this is not always a good idea. If there are other tests that cover the real value then it's ok, if not we are hiding the real type by coercing to a boolean.

What I mean is that if a regression is introduced where response.socket is set to null (or any other falsy value) instead of undefined, with this change, we will not notice.

Sorry, something went wrong.

Uh oh!

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

antsmartian and benjamingr reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

@antsmartian antsmartian Jul 22, 2018

Copy link
Copy Markdown
Contributor Author

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.

@lpinca I got your point. I even thought about it before I did the changes, but in this context, when the response is finished, its gonna be undefined. So socket and connection are no more valid, I felt it was fine to use ok. But yeah, if some other logic expects the socket to be undefined and we pass null, we gonna cause a regression. Good point.

Sorry, something went wrong.

Uh oh!

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

All reactions
@antsmartian
antsmartian force-pushed the refactor branch 2 times, most recently from e9106e1 to 96a8979 Compare July 22, 2018 11:01
lpinca
lpinca approved these changes Jul 22, 2018
View reviewed changes
maclover7
maclover7 approved these changes Jul 22, 2018
View reviewed changes
trivikr
trivikr approved these changes Jul 22, 2018
View reviewed changes
benjamingr
benjamingr approved these changes Jul 22, 2018
View reviewed changes

@benjamingr benjamingr 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.

I agree with lpinca's point about the assert.ok though.

Sorry, something went wrong.

Uh oh!

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

All reactions
cjihrig
cjihrig approved these changes Jul 22, 2018
View reviewed changes

@cjihrig cjihrig left a comment

Copy link
Copy Markdown
Contributor

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.

LGTM, but please change the assert.ok() calls back. I think it's fine for language-level APIs, but we should be more strict with the APIs we provide for the reasons previously noted.

Sorry, something went wrong.

Uh oh!

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

All reactions
jasnell
jasnell approved these changes Jul 23, 2018
View reviewed changes
@maclover7

maclover7 commented Jul 28, 2018

Copy link
Copy Markdown
Contributor

ping @antsmartian

All reactions

Sorry, something went wrong.

Uh oh!

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

@maclover7 maclover7 added the wip Issues and PRs that are still a work in progress. label Jul 28, 2018
@antsmartian

antsmartian commented Jul 28, 2018

Copy link
Copy Markdown
Contributor Author

@maclover7 Oops, sorry. Will update the PR in an hour or so.

All reactions

Sorry, something went wrong.

Uh oh!

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

@antsmartian
test: Refactor test-http2-compat-serverresponse-finished.js
c1c6238
@antsmartian
antsmartian force-pushed the refactor branch from 96a8979 to c1c6238 Compare July 28, 2018 04:41
@antsmartian

antsmartian commented Jul 28, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

@maclover7 Ping :)

All reactions

Sorry, something went wrong.

Uh oh!

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

maclover7
maclover7 approved these changes Jul 28, 2018
View reviewed changes
sagirk
sagirk approved these changes Jul 31, 2018
View reviewed changes
@maclover7 maclover7 added test Issues and PRs related to Node.js core tests and test infrastructure. http2 Issues and PRs related to the http2 subsystem. author ready PRs with CI started, the required approvals, and no outstanding review comments. and removed wip Issues and PRs that are still a work in progress. labels Jul 31, 2018
@maclover7

maclover7 commented Jul 31, 2018

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@trivikr

trivikr commented Aug 1, 2018

Copy link
Copy Markdown
Member

Landed in f2518c4

All reactions

Sorry, something went wrong.

Uh oh!

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

@trivikr trivikr closed this Aug 1, 2018
trivikr pushed a commit that referenced this pull request Aug 1, 2018
@antsmartian @trivikr
test: refactor test-http2-compat-serverresponse-finished.js
f2518c4
PR-URL: #21929
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Aug 1, 2018
@antsmartian @targos
test: refactor test-http2-compat-serverresponse-finished.js
52020dc
PR-URL: #21929
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@antsmartian
antsmartian deleted the refactor branch August 4, 2018 08:39
@rvagg rvagg mentioned this pull request Aug 13, 2018
Release proposal: v10.9.0 #22295
Merged
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#230
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#215
Closed
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#231
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#216
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#232
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#217
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#233
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#218
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#234
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#219
Closed
kjin pushed a commit to kjin/node that referenced this pull request Sep 25, 2018
@antsmartian @kjin
test: refactor test-http2-compat-serverresponse-finished.js
16b1120
PR-URL: nodejs#21929
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
@antsmartian @kjin
test: refactor test-http2-compat-serverresponse-finished.js
833ef17
PR-URL: nodejs#21929
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
@antsmartian @BethGriggs
test: refactor test-http2-compat-serverresponse-finished.js
dcf04dc
Backport-PR-URL: #22850
PR-URL: #21929
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Oct 30, 2018
v8.13.0 proposal #23974
Merged
@beevelop beevelop mentioned this pull request Nov 20, 2018
2018-11-20 Version 8.13.0 'Carbon' (LTS) @MylesBorins prepared by @BethGriggs beevelop/docker-android-nodejs#250
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@benjamingr benjamingr benjamingr approved these changes
@lpinca lpinca lpinca approved these changes
@cjihrig cjihrig cjihrig approved these changes
@trivikr trivikr trivikr approved these changes
+2 more reviewers
@sagirk sagirk sagirk approved these changes
@maclover7 maclover7 maclover7 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. http2 Issues and PRs related to the http2 subsystem. 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.

8 participants

@antsmartian @maclover7 @trivikr @jasnell @benjamingr @lpinca @cjihrig @sagirk
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.