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: make sure app ready on parallel mode #155
Conversation
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.
LGTM
@@ -47,6 +47,9 @@ exports.getApp = async suite => { | |||
if (getAppCallback) { | |||
return getAppCallback(suite); | |||
} | |||
if (app) { | |||
await app.ready(); |
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.
是哪里用的时候没有 await ready?
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.
runSuite 里面 await 了这个 proxy app,会直接卡住 https://github.com/eggjs/egg-mock/blob/master/lib/inject_context.js#L22
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.
应该会走到 get then 返回 undefined。会卡住能重现吗?
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.
可以的,egg-bin 里面那个并行测试用例必现。
Codecov ReportBase: 85.46% // Head: 85.49% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #155 +/- ##
==========================================
+ Coverage 85.46% 85.49% +0.02%
==========================================
Files 27 27
Lines 2546 2550 +4
Branches 454 455 +1
==========================================
+ Hits 2176 2180 +4
Misses 370 370
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
[skip ci] ## [5.10.2](v5.10.1...v5.10.2) (2023-01-30) ### Bug Fixes * make sure app ready on parallel mode ([#155](#155)) ([83c600e](83c600e))
🎉 This PR is included in version 5.10.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Checklist
npm test
passesAffected core subsystem(s)
Description of change