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: revise test-http-client-default-headers-exist by Trott · Pull Request #32493 · nodejs/node

Conversation

@Trott

@Trott Trott commented Mar 25, 2020

Copy link
Copy Markdown
Member
  • Remove assert.strictEqual where assert.ok suffices
  • Replace countdown with Promise.all()
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
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to Node.js core tests and test infrastructure. label Mar 25, 2020
@nodejs-github-bot

This comment has been minimized.

Sign in to view
@nodejs-github-bot

This comment has been minimized.

Sign in to view
jasnell
jasnell reviewed Mar 26, 2020
View reviewed changes
Comment thread test/parallel/test-http-client-default-headers-exist.js Outdated

@jasnell jasnell Mar 26, 2020

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.

It's not an issue with this particular test, but keep in mind that changing all of these to use Promises is changing the timing of these tests... rather than executing the countdown cleanup logic synchronously it is being deferred to the microtask queue. That could end up causing the test to miss issues that may exist when closing things down synchronously so worth watching... also, keep this issue in mind also when refactoring these :-) .. as I said, not an issue on this particular test but there are some where it may be relevant.

Sorry, something went wrong.

Uh oh!

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

Trott reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@Trott Trott Mar 26, 2020 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member 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.

I want to make sure I understand your point about the cleanup code and the microtask queue. Are you saying that with countdown, the callback that checks things executes synchronously whenever the pertinent .dec() call happens, whereas with Promise.all(), it is whenever the microtask queue runs the resolve callback in the .then() call, so it might execute at a different time and with things in a different state than countdown?

If so: That's something I hadn't considered and worth watching out for. Thanks for pointing it out! (And thanks for making me take a few minutes to re-learn about the microtask queue, which is something I almost never think about!)

Sorry, something went wrong.

Uh oh!

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

All reactions
jasnell
jasnell approved these changes Mar 26, 2020
View reviewed changes
@Trott Trott added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Mar 27, 2020
@nodejs-github-bot

This comment has been minimized.

Sign in to view
@nodejs-github-bot

This comment has been minimized.

Sign in to view
@nodejs-github-bot

nodejs-github-bot commented Mar 27, 2020 •
edited by addaleax
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/30132/ (:yellow_heart:)

All reactions

Sorry, something went wrong.

Uh oh!

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

addaleax
addaleax approved these changes Mar 27, 2020
View reviewed changes
@Trott
test: revise test-http-client-default-headers-exist
436c71d
* Remove assert.strictEqual where assert.ok suffices
* Replace countdown with Promise.all()

PR-URL: nodejs#32493
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@Trott
Trott force-pushed the def-headers branch from 0187f52 to 436c71d Compare March 27, 2020 23:59
@Trott
Trott merged commit 436c71d into nodejs:master Mar 27, 2020
@Trott

Trott commented Mar 27, 2020

Copy link
Copy Markdown
Member Author

Landed in 436c71d

All reactions

Sorry, something went wrong.

Uh oh!

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

@Trott
Trott deleted the def-headers branch March 28, 2020 00:00
addaleax pushed a commit that referenced this pull request Mar 30, 2020
@Trott @addaleax
test: revise test-http-client-default-headers-exist
2f8f619
* Remove assert.strictEqual where assert.ok suffices
* Replace countdown with Promise.all()

PR-URL: #32493
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@targos targos mentioned this pull request Apr 13, 2020
v13.13.0 release proposal #32813
Merged
targos pushed a commit that referenced this pull request Apr 22, 2020
@Trott @targos
test: revise test-http-client-default-headers-exist
565f0f7
* Remove assert.strictEqual where assert.ok suffices
* Replace countdown with Promise.all()

PR-URL: #32493
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@targos targos mentioned this pull request Apr 22, 2020
v12.16.3 release proposal #33009
Merged
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
@addaleax addaleax addaleax approved these changes

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

@Trott @nodejs-github-bot @jasnell @addaleax
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 01402503 — 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.