[in_app_purchase_storekit] Address flaky tests#11270
[in_app_purchase_storekit] Address flaky tests#11270LouiseHsu wants to merge 6 commits intoflutter:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request addresses flaky tests in InAppPurchaseStoreKit2PluginTests.swift by skipping certain tests on a specific OS version known to have a StoreKit bug, and by increasing the timeout for two other tests. My review focuses on improving the maintainability of these changes. I've suggested extracting duplicated test-skipping logic into a helper function and replacing a magic number for a timeout with a named constant. These changes will make the test suite cleaner and easier to manage.
.../in_app_purchase_storekit/example/shared/RunnerTests/InAppPurchaseStoreKit2PluginTests.swift
Show resolved
Hide resolved
.../in_app_purchase_storekit/example/shared/RunnerTests/InAppPurchaseStoreKit2PluginTests.swift
Show resolved
Hide resolved
| let osVersion = ProcessInfo.processInfo.operatingSystemVersion | ||
| try XCTSkipIf( | ||
| osVersion.majorVersion == 23 && osVersion.minorVersion == 2, | ||
| "Known StoreKitTest bug on Xcode 23.2 with setSimulatedError() when used on .loadProducts API" | ||
| ) |
There was a problem hiding this comment.
https://developer.apple.com/forums/thread/808030
.setSimulatedError doesnt work on specifically 26.2, but apples availability annotation doesnt support donut hole versioning.
Fixes flutter/flutter#182845
Probably fixes flutter/flutter#183318
Pre-Review Checklist
[shared_preferences]///).If you need help, consider asking for advice on the #hackers-new channel on [Discord].