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

fix: Windows-specific test timeout issues introduced by Yarn 1.13.0 #7838

Merged
merged 3 commits into from
Feb 11, 2019

Conversation

willsmythe
Copy link
Contributor

One option for addressing #7760

  • Change e2e/runJest.js to invoke node directly to avoid issue with hung process/test when invoked asynchronously ("until" method)
  • Refactor to avoid duplication between runJest and until methods
  • Undo downgrade of Yarn (to 1.9.4) in Azure Pipelines Windows jobs
  • Add /reports/* to .gitignore (these are junit test reports normally created in CI runs)

Summary

See #7760 for details

Test plan

Tested on Windows, Linux, mac

See jestjs#7760 for details

* Change e2e/runJest.js to invoke node directly to avoid issue with hung process/test when invoked asynchronously ("until" method)
* Refactor to avoid duplication between runJest and until methods
* Undo downgrade of Yarn (to 1.9.4) in Azure Pipelines Windows jobs
* Add /reports/* to .gitignore (these are junit test reports normally created in CI runs)
@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up 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 the corporate CLA signed.

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

@jeysal
Copy link
Contributor

jeysal commented Feb 9, 2019

Thanks for doing this, option 1 from your comment sounds like the best one to me as well, especially since it does pretty much the same thing that Yarn could do to fix this behavior with process.execPath.
The two CI failures are both just flaky I believe.
Could you sign the CLA please? :)

}

// Spawns Jest and returns either a Promise (if spawnAsync is true) or the completed child process
function spawnJest(
Copy link
Contributor

Choose a reason for hiding this comment

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

Pretty nice refactor to avoid the code duplication btw, regardless of the actual fix 👍

Copy link
Member

Choose a reason for hiding this comment

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

Yeah - I was gonna circle back to this when I wrote it, but never got around to it... Nice and clean now :)

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.

This is great, thank you very much!

Happy to merge once the CLA is signed :)

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@SimenB SimenB merged commit 780c838 into jestjs:master Feb 11, 2019
@SimenB SimenB mentioned this pull request Feb 11, 2019
@willsmythe willsmythe deleted the hungRunJestFix branch February 22, 2019 21:04
@github-actions
Copy link

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 May 12, 2021
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.

4 participants