fix(cli): add --exit flag to mocha e2e config to prevent test hanging#7934
fix(cli): add --exit flag to mocha e2e config to prevent test hanging#7934Mo-Hussain merged 1 commit intomainfrom
Conversation
📝 WalkthroughWalkthroughThe Mocha end-to-end test configuration gets a bit of tweaking here. A trailing comma joins the node-option array, and an exit flag is added to ensure the process terminates cleanly after tests finish running. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7934 +/- ##
=======================================
Coverage 77.02% 77.02%
=======================================
Files 117 117
Lines 2651 2651
Branches 244 244
=======================================
Hits 2042 2042
Misses 593 593
Partials 16 16
🚀 New features to boost your workflow:
|
Summary
Adds the
--exitflag to the Mocha e2e test configuration to prevent tests from hanging due to unclosed handles.Problem
The Ethereum e2e tests (particularly
warp-rebalancer) were hanging indefinitely after test completion, causing CI jobs to timeout after 20 minutes. Investigation revealed:e2e-test.setup.tswithout corresponding cleanup inafter()hooks--exitflag forces Mocha to exit after tests complete, regardless of open handlesWhat
--exitDoesFrom Mocha docs:
Trade-offs
Long-term Resolution
This is a temporary workaround. The proper fix involves:
after()hooks ine2e-test.setup.tsto properly stop testcontainers--exitflag once cleanup is properly handledWe are actively revamping the e2e tests for the rebalancer, and proper resource cleanup will be part of that effort.
Testing
--exitflag resolves the hanging issueSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.