-
Notifications
You must be signed in to change notification settings - Fork 334
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
Fix iOS 15 tests #4320
Fix iOS 15 tests #4320
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
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.
Looks good to me if it works 😇 Thanks for fixing! 🫶
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.
Ohh interesting... didn't notice the issues with the semaphore. Thanks for fixing!
This comment was marked as outdated.
This comment was marked as outdated.
|
||
self.mockDiagnosticsTracker = MockDiagnosticsTracker() | ||
} | ||
|
||
func testFetchProductsWithIdentifiersSK2TracksCorrectly() throws { |
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.
isStoreKit2Available
is always false for iOS < 16, so this test was running with storeKit1
even after configuring the manager using SK2
@RCGitBot please test |
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.
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.
Just a comment but looks good!
@@ -159,14 +159,12 @@ private extension DiagnosticsTracker { | |||
func clearDiagnosticsFileIfTooBig() async { | |||
if await self.diagnosticsFileHandler.isDiagnosticsFileTooBig() { | |||
await self.diagnosticsFileHandler.emptyDiagnosticsFile() | |||
self.trackMaxEventsStoredLimitReached() | |||
await self.clearDiagnosticsFileIfTooBig() |
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.
Hmm is this needed? I guess when calling this, since we just emptied the file in the line above, it shouldn't do anything, but shouldn't be needed normally?
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.
not needed right. I forgot to remove this line when copying the content of track
This pull request includes changes to the
MockOperationDispatcher
class in theTests/UnitTests/Mocks/MockOperationDispatcher.swift
file to improve the handling of asynchronous tasks. The most important change is the replacement of a semaphore with a dispatch group to ensure the async task completes before proceeding.It looks like the semaphore was causing issues in iOS 15, making the test forever