-
Notifications
You must be signed in to change notification settings - Fork 681
[CI]【Hackathon 9th Sprint No.35】功能模块 fastdeploy/engine/ common_engine.py 单测补充 #5665
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
|
Thanks for your contribution! |
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.
Pull request overview
本 PR 为 Hackathon 9th Sprint No.35 任务,旨在补充 fastdeploy/engine/common_engine.py 模块的单元测试覆盖率。主要添加了针对 EngineService 核心功能的测试用例,包括任务插入、预填充请求处理、分块更新、token 解码和 ZMQ 通信等关键路径的测试。
- 新增 10 个测试方法覆盖
common_engine.py中的各种边界条件和错误处理路径 - 添加辅助方法
_make_request和_make_minimal_engine简化测试对象创建 - 引入必要的导入(
types,Request,RequestOutput,envs)支持新测试
tests/engine/test_common_engine.py
Outdated
|
|
||
| def test_insert_prefilled_requests_error_and_success(self): | ||
| """Cover _insert_prefilled_requests branches for error_code != 200 and eos-handling.""" | ||
| from fastdeploy.engine.request import RequestOutput |
Copilot
AI
Dec 19, 2025
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.
RequestOutput is already imported at the top of the file (line 27). This local import is redundant and should be removed.
| from fastdeploy.engine.request import RequestOutput |
tests/engine/test_common_engine.py
Outdated
| from fastdeploy.utils import envs | ||
|
|
Copilot
AI
Dec 19, 2025
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.
The envs module is already imported at the top of the file (line 28). This local import is redundant and should be removed.
| from fastdeploy.utils import envs |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5665 +/- ##
==========================================
Coverage ? 18.80%
==========================================
Files ? 345
Lines ? 45095
Branches ? 6915
==========================================
Hits ? 8481
Misses ? 36109
Partials ? 505
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Motivation
No need
Modifications
No need
Usage or Command
No need
Accuracy Tests
No need
Checklist
[FDConfig],[APIServer],[Engine],[Scheduler],[PD Disaggregation],[Executor],[Graph Optimization],[Speculative Decoding],[RL],[Models],[Quantization],[Loader],[OP],[KVCache],[DataProcessor],[BugFix],[Docs],[CI],[Optimization],[Feature],[Benchmark],[Others],[XPU],[HPU],[GCU],[DCU],[Iluvatar],[Metax]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.