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: make sure weak references are not GCed to early #27482

Closed
wants to merge 2 commits into from

Conversation

BridgeAR
Copy link
Member

This fixes flaky util.inspect tests by making sure that the
inspected WeakMap and WeakSet only contains objects that still have
other hard references. Otherwise the garbage collection could collect
these objects to early.

Refs: #27440 (comment)

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

@BridgeAR BridgeAR requested a review from targos April 29, 2019 19:10
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 29, 2019
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

Typo: to -> too

This fixes flaky `util.inspect` tests by making sure that the
inspected WeakMap and WeakSet only contains objects that still have
other hard references. Otherwise the garbage collection could collect
these objects to early.
@BridgeAR BridgeAR force-pushed the fix-flaky-inspect-test branch from c113120 to 73d936c Compare April 30, 2019 12:20
@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 30, 2019
@nodejs-github-bot
Copy link
Collaborator

@BridgeAR
Copy link
Member Author

BridgeAR commented May 1, 2019

Landed in caf9d3c 🎉

@BridgeAR BridgeAR closed this May 1, 2019
BridgeAR added a commit to BridgeAR/node that referenced this pull request May 1, 2019
This fixes flaky `util.inspect` tests by making sure that the
inspected WeakMap and WeakSet only contains objects that still have
other hard references. Otherwise the garbage collection could collect
these objects to early.

PR-URL: nodejs#27482
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit that referenced this pull request May 4, 2019
This fixes flaky `util.inspect` tests by making sure that the
inspected WeakMap and WeakSet only contains objects that still have
other hard references. Otherwise the garbage collection could collect
these objects to early.

PR-URL: #27482
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@targos targos mentioned this pull request May 6, 2019
@BridgeAR BridgeAR deleted the fix-flaky-inspect-test branch January 20, 2020 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants