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: add and use checkIfCollectable in vm leak tests #49671

Closed
wants to merge 4 commits into from

Commits on Sep 16, 2023

  1. Configuration menu
    Copy the full SHA
    325e5a6 View commit details
    Browse the repository at this point in the history
  2. test: use checkIfCollectable in vm leak tests

    Previously we simply create a lot of the target objects and check
    if the process crash due to OOM. Due to how we use emphemeron GC
    to handle memory management, which is inefficient but necessary
    for correctness, the tests can produce false positives as
    the GC isn't efficient enough to catch up with a very fast
    heap growth.
    
    This patch uses a new checkIfCollectable() utility to terminate the
    test early once we detect that any of the target object can actually
    be garbage collected. This should lower the chance of false positives.
    As a drive-by this also allows us to use setImmediate() to grow the
    heap even faster to make the tests run faster.
    joyeecheung committed Sep 16, 2023
    Configuration menu
    Copy the full SHA
    6174c98 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2023

  1. Configuration menu
    Copy the full SHA
    63a6ab6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4561ac3 View commit details
    Browse the repository at this point in the history