-
Notifications
You must be signed in to change notification settings - Fork 117
AINFRA-778 - Make StorageTests a Swift package test target #15794
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
base: trunk
Are you sure you want to change the base?
Conversation
Generated by 🚫 Danger |
|
"name" : "WooFoundationTests" | ||
"containerPath" : "container:..\/Yosemite\/Yosemite.xcodeproj", | ||
"identifier" : "B5C9DDFD2087FEC0006B910A", | ||
"name" : "YosemiteTests" |
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.
Beats me why Xcode changes the order almost every time there is an edit.
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.
Thanks for your work on this @mokagio
It does pass CI but I get a crash when running the Storage suite as standalone, specifically on FileStorageTests.test_file_is_loaded()
which crashes due force-unwrapping the URL for shipment-provider.plist
that we load from the bundle:
Test Case '-[StorageTests.FileStorageTests test_file_is_loaded]' started.
StorageTests/FileStorageTests.swift:25: Fatal error: Unexpectedly found nil while unwrapping an Optional value
I do see the plist file in Tests/StorageTests/Resources
, but perhaps the bundle address to FileStorageTests
has changed when moving things around?
Separate question, related to the PR but for another time: The suite takes 120+ seconds to run, despite expected to take longer as we seem to write to disk in these tests and perform DB migrations, which makes me think a bunch of these are not needed anymore?
For example: We hold migration tests starting from model 26 to 27, which is 4years+ old and far from being supported when a user installs the app, as well as all the data models since model 1, which was created ~2018 and no user would interact with it now. Thoughts on clearing/deleting some of these?
Interesting. It works fine on my end: 🤔 I assume you used the Storage scheme, right? I doubt that it would make a difference, but on which device? |
I noticed the tests being very slow, too. See #15742 (comment) and p1748498088604749/1748498018.125619-slack-C6H8C3G23. But this conversation made me realize I never tracked the need to look into it. Now done with https://linear.app/a8c/issue/AINFRA-824 |
For some reason I didn't get notified of you reply, I've approved it as seems to be on my end only and CI passes in any case, sorry for blocking this.
Yeah, Storage scheme and simulator iPad (A16) - iOS 18.3.1 from Xcode 16.4 🤔
Thanks! |
Description
Now that all the frameworks sources are Swift packages (targets in the same Swift package to be precise) we can move the tests there, too. We didn't do that all in one go to avoid big diffs.
Notice:
Storage/
folder has been removed, including the dedicated Xcode projectTesting information
See green CI.
Additionally, you can run the focused
HardwareStorage tests by selecting theHardwareStorage scheme from Xcode.Screenshots
RELEASE-NOTES.txt
if necessary.