Automattic / Gravatar-SDK-iOS

Gravatar SDK is a Swift library that allows you to integrate Gravatar features into your own iOS applications.
https://gravatar.com
Mozilla Public License 2.0
52 stars 5 forks source link

Use a thread safe cache in TestImageCache to fix a crash #430

Closed pinarol closed 1 month ago

pinarol commented 1 month ago

Closes #

Description

Fixes a crash that happens in CI from time to time:

Screenshot 2024-09-26 at 12 08 55

I think the crash happened because the mock cache in the TestImageCache was not thread safe so i replace it with ImageCache which is thread safe.

Testing Steps

Try running the failing test case many times testNotCurrentSourceTaskResult.

wpmobilebot commented 1 month ago
Gravatar UIKit Prototype Build📲 You can test the changes from this Pull Request in Gravatar UIKit Prototype Build by scanning the QR code below to install the corresponding build.
App NameGravatar UIKit Prototype Build Gravatar UIKit Prototype Build
Build Number1318
Version1.0
Bundle IDcom.automattic.gravatar-sdk-demo-uikit.prototype-build
Commit23ad0987df5b7cdca143d341a1fd2ccd8fc133ea
App Center BuildGravatar SDK Demo - UIKit #166
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
wpmobilebot commented 1 month ago
Gravatar SwiftUI Prototype Build📲 You can test the changes from this Pull Request in Gravatar SwiftUI Prototype Build by scanning the QR code below to install the corresponding build.
App NameGravatar SwiftUI Prototype Build Gravatar SwiftUI Prototype Build
Build Number1318
Version1.0
Bundle IDcom.automattic.gravatar-sdk-demo-swiftui.prototype-build
Commit23ad0987df5b7cdca143d341a1fd2ccd8fc133ea
App Center BuildGravatar SDK Demo - SwiftUI #165
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.