-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
test(ci): force mocha to exit on stuck process #11538
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
Conversation
WalkthroughThe Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.mocharc.json (1)
2-2
: Use a dedicated config file or .mocharc.js for comments
JSON doesn’t support comments natively. Using the"__comment"
property is a workaround that can clutter the configuration. Consider migrating to.mocharc.js
(or JSONC) to enable real comments and improve maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.mocharc.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: formatting
- GitHub Check: build
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.mocharc.json (1)
3-3
: Approve exit flag for forcing Mocha to exit
Adding"exit": true
is an effective temporary measure to prevent CI hangs. Remember to remove this flag once the underlying cause of stuck tests is resolved, as noted in the TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your help @OSA413
Description of change
It incorporates the
--exit
flag to the mocha process so it tells the stuck test to exit. This makes it so that we don't waste the runner time on the stuck processes.It's not a good practice, but a "fix" for the situation. We should probably investigate what goes wrong instead of incorporating this "fix".
Example of stuck test: https://github.com/typeorm/typeorm/actions/runs/15684954283/job/44480235851?pr=11524
Pull-Request Checklist
master
branchFixes #00000
Summary by CodeRabbit