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

Do not collect SIGNREQUEST as open handles #12789

Merged
merged 3 commits into from May 2, 2022
Merged

Conversation

cristianrgreco
Copy link
Contributor

@cristianrgreco cristianrgreco commented May 2, 2022

Summary

See the linked issue for more information.
Fixes #12775.

Test Plan

Unit test added. See before:

➜  jest git:(main) ✗ yarn jest collectHandles
 FAIL  packages/jest-core/src/__tests__/collectHandles.test.js
  collectHandles
    ✓ should collect Timeout (107 ms)
    ✓ should not collect the PerformanceObserver open handle (102 ms)
    ✓ should not collect the DNSCHANNEL open handle (103 ms)
    ✓ should not collect the ZLIB open handle (103 ms)
    ✕ should not collect the SIGNREQUEST open handle (106 ms)
    ✓ should collect handles opened in test functions with `done` callbacks (106 ms)
    ✓ should not collect handles that have been queued to close (106 ms)
    ✓ should collect handles indirectly triggered by user code (110 ms)

  ● collectHandles › should not collect the SIGNREQUEST open handle

    expect(received).not.toContainEqual(expected) // deep equality

    Expected value: not ObjectContaining {"message": "SIGNREQUEST"}
    Received array:     [[Error: SIGNREQUEST], [Error: Timeout]]

      at Object.toContainEqual (packages/jest-core/src/__tests__/collectHandles.test.js:82:29)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 7 passed, 8 total
Snapshots:   0 total
Time:        1.095 s, estimated 2 s

See after:

➜  jest git:(patch-1) ✗ yarn jest collectHandles                                        
 PASS  packages/jest-core/src/__tests__/collectHandles.test.js
  collectHandles
    ✓ should collect Timeout (108 ms)
    ✓ should not collect the PerformanceObserver open handle (101 ms)
    ✓ should not collect the DNSCHANNEL open handle (104 ms)
    ✓ should not collect the ZLIB open handle (105 ms)
    ✓ should not collect the SIGNREQUEST open handle (104 ms)
    ✓ should collect handles opened in test functions with `done` callbacks (110 ms)
    ✓ should not collect handles that have been queued to close (106 ms)
    ✓ should collect handles indirectly triggered by user code (111 ms)

Test Suites: 1 passed, 1 total
Tests:       8 passed, 8 total
Snapshots:   0 total
Time:        1.127 s, estimated 2 s

@facebook-github-bot
Copy link
Contributor

Hi @cristianrgreco!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@cristianrgreco cristianrgreco marked this pull request as ready for review May 2, 2022 09:11
@cristianrgreco cristianrgreco changed the title Do not report SIGNREQUEST as an open handle Do not collect SIGNREQUEST as open handles May 2, 2022
@SimenB
Copy link
Member

SimenB commented May 2, 2022

Thanks! Could you add a test as well?

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@cristianrgreco
Copy link
Contributor Author

cristianrgreco commented May 2, 2022

@SimenB Done and test plan updated 🙂

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks!

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: SIGNREQUEST incorrectly detected as an open handle
3 participants