Repository navigation
test(weather): make widget refresh startup test deterministic - #603
Merged
Merged
Conversation
|
✅ OpenCodeReview: Review skipped: no items were selected. |
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
YinCheng0106
marked this pull request as ready for review
October 11, 2026 08:03
lowrt
approved these changes
Oct 11, 2026
PiscesXD
approved these changes
Oct 11, 2026
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.
這個 PR 做了什麼
修正
testWeatherAndClockStartBeforeEitherCompletes的排程相依等待方式。原測試在 main(2b63202c)使用 200 次Task.yield()等待工作啟動,在 iPhone 17 Pro/iOS 27.0 模擬器重現XCTAssertTrue failed,官方測試腳本以 65 結束。ios/RunnerTests/SavedCurrentWeatherWidgetRefreshServiceTests.swift,weather 與 clock closure 各自發出 XCTest 啟動 expectation,透過非阻塞的fulfillment等待兩個事件,逾時上限為 5 秒。AsyncOperationGate;兩個啟動事件確認前不開啟 gate,並檢查寫入次數為 0。等待逾時後仍依序開啟兩個 gate,再等待 refresh task 完成,避免留下受阻工作。相關 issue
無
怎麼驗
使用既有 iPhone 17 Pro/iOS 27.0 模擬器(
358044FD-784B-4516-8BBD-82DC1B851AF9),所有 iOS 測試均透過tool/dev/test_ios.sh執行。XCTAssertTrue failed。tool/check.sh全數通過,Flutter coverage 測試 3,115 通過、10 跳過、0 失敗。tool/dev/test_ios.sh:327 通過、0 失敗、0 跳過;數字取自完成的.xcresult。tool/check/commits.sh origin/main..HEAD:1 commit 通過。git diff --check通過;依 commit.md 執行提交前後的tool/commit.sh,保留 Git hooks。檢查清單
tool/check/commits.sh origin/main..HEAD通過tool/check.sh的格式、分析與 Flutter coverage 測試通過