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

[Bug]: Watch mode locks up at "Determining test suites to run..." after several activations #12757

Closed
joshkel opened this issue Apr 27, 2022 · 4 comments · Fixed by #12960
Closed

Comments

@joshkel
Copy link
Contributor

joshkel commented Apr 27, 2022

Version

28.0.2 (also observed in 27.5.1)

Steps to reproduce

  1. Clone https://github.com/joshkel/jest-throat-repo
  2. Run yarn test
  3. In another terminal window, trigger the watch several times: touch packages/a/jest.config.js
  4. After running touch 16 times, Jest hangs at the "Determining test suites to run..." step.

Expected behavior

Jest should not lock up.

Actual behavior

Jest locks up at the "Determining test suites to run..." step. If I restart Jest at that point, everything works fine (until the next time a watch run is triggered 16 times).

Additional context

This appears to be the result of ForbesLindesay/throat#61. If I locally apply ForbesLindesay/throat#62, things work as expected.

I noticed that that bug has been open for a while. Maybe Jest should switch to another package, such as p-limit? (I noticed that Jest already has a transitive dependency on p-limit, although it's an older version.)

Environment

System:
    OS: macOS 12.3.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 14.19.1 - ~/.nvm/versions/node/v14.19.1/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 6.14.16 - ~/.nvm/versions/node/v14.19.1/bin/npm
  npmPackages:
    jest: ^28.0.2 => 28.0.2
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label May 27, 2022
joshkel added a commit to joshkel/jest that referenced this issue Jun 23, 2022
Throat has a significant unacknowledged bug (ForbesLindesay/throat#61) that may cause it to lock up with repeated invocations.

Sindre's p-limit appears to be better supported.  I picked p-limit 3.x (the last version before the switch to pure ESM) to match Jest's usage of other packages from Sindre.

Fixes jestjs#12757
@joshkel
Copy link
Contributor Author

joshkel commented Jun 23, 2022

I'm still regularly encountering this, and throat still has not seen a release, so I do not believe this should be marked stale. See #12960 for a fix.

@SimenB
Copy link
Member

SimenB commented Jul 13, 2022

https://github.com/facebook/jest/releases/tag/v28.1.3

@github-actions
Copy link

This issue 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 Aug 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants