Repository navigation
test: 手机 IPC 测试等 updater 就绪后再调用更新命令 - #186
Merged
Merged
Conversation
setup 先管理 Bridge、再管理 updater,测试线程只等 Bridge 时,慢的 CI 机器上 update_status 会报 state not managed(2026-10-24,#184 的 rust gates)。在 setup 的这两步之间加 300 ms 延迟可以稳定复现;改为同时等 updater 后,32 核满载下连续 30 轮全部通过。
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #186 +/- ##
==========================================
- Coverage 93.79% 93.77% -0.02%
==========================================
Files 388 388
Lines 55271 55271
Branches 3743 3743
==========================================
- Hits 51840 51832 -8
- Misses 2935 2943 +8
Partials 496 496
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#184 的 rust gates 里,
apps/mobile/src-tauri/tests/ipc.rs的an_install_from_play_is_updated_by_play_and_points_to_its_listing失败一次(重跑通过):原因:
build_app的setup先在attach_bridge中管理Bridge,之后才创建并管理PhoneUpdater;测试线程只等Bridge出现就调用update_status,在慢的 CI 机器上会早于app.manage(updater)。with_app_updating在等Bridge之后,再等Arc<PhoneUpdater>出现。所有经过这个函数的测试都受益(三个测试一开始就调用update_status)。setup的这两步之间临时加 300 ms 延迟,修改前每次都以同样的错误失败,修改后通过;延迟没有提交。--test ipc的 19 个测试在 32 核满载下连续运行 30 轮,全部通过。只改测试,不改应用代码。