test(android): pin SvgIconCacheTest to Robolectric SDK 28 - #723
Merged
Merged
Conversation
Including Android resources in unit tests (#642) makes Robolectric default to the project's SDK 36, which requires Java 21 and fails on CI's older JVM. Pin the SDK as the other Robolectric test classes already do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
XCFramework BuildThis PR's XCFramework is available for testing. Add the following to your .package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/723")Built from 87b2075 |
dcalhoun
marked this pull request as ready for review
September 23, 2026 14:50
Contributor
|
@dcalhoun Claude had a few findings, but they don't appear to be important. I'll approve and leave it to you to determine if anything needs changing.
|
Member
Author
|
Thanks! I'll merge to unblock CI and other PRs. We can follow up on the findings separately if deemed worthwhile. |
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.
What?
Fix unexpected
SvgIconCacheTestfailure due to missing config introduced in #642.Why?
Prevent blocking CI failures.
How?
Add the
@Config(sdk = [28])found in other Android tests to align with the current practice.Testing Instructions
N/A, no user-facing changes.
Accessibility Testing Instructions
N/A, no user-facing changes.
Screenshots or screencast
N/A, no user-facing changes.
AI-generated details
Problem: Trunk's
:android: Test Android Libraryjob fails (build 2997):SvgIconCacheTest > classMethod FAILED — UnsupportedOperationException at DefaultSdkProvider.java:174.Cause: #642 enabled
isIncludeAndroidResources, so Robolectric now defaults to the project's SDK 36, which requires Java 21. CI runs an older JVM.SvgIconCacheTestwas the only Robolectric class without an explicit@Config(sdk = [28]). Local runs pass on Java 21, which hid it.Fix: Pin the class to SDK 28 like the others.
Testing: CI's
:android: Test Android Librarypasses. Locally:android/gradlew -p android :Gutenberg:testDebugUnitTest --tests "org.wordpress.gutenberg.inserter.SvgIconCacheTest".🤖 Generated with Claude Code