[auto-generated] Fix CI: Align kotlin-reflect + suppress API 28-30 + fix timing#2911
Closed
brandonpage wants to merge 1 commit into
Closed
[auto-generated] Fix CI: Align kotlin-reflect + suppress API 28-30 + fix timing#2911brandonpage wants to merge 1 commit into
brandonpage wants to merge 1 commit into
Conversation
…bility Root cause: MockK 1.14.9 pulls kotlin-reflect:2.2.21 which cannot parse Kotlin 2.3.20 bytecode metadata, causing ArrayIndexOutOfBoundsException in 194 tests. Additionally, androidx.activity:1.13.0 references API 31+ classes causing NoClassDefFoundError on APIs 28-30, and Thread.sleep(200) is insufficient for async coroutine completion on API 34 CI. Failing test(s): All MockK-based tests (194), PickerBottomSheetTest, SalesforceSDKManagerTests, LoginViewModelMockTest, TokenMigrationWebViewTest (on APIs 28-30), LoginViewModelTest (flaky on API 34). Fix: - Add explicit kotlin-reflect:2.3.20 dependency to force-align with project Kotlin version - Add @SdkSuppress(minSdkVersion=31) to tests requiring ComponentActivity on API 31+ - Increase Thread.sleep from 200ms to 2000ms for async coroutine completion in CI
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2911 +/- ##
============================================
+ Coverage 66.52% 66.58% +0.05%
- Complexity 3105 3107 +2
============================================
Files 226 226
Lines 17871 17871
Branches 2339 2339
============================================
+ Hits 11889 11899 +10
+ Misses 4897 4887 -10
Partials 1085 1085
🚀 New features to boost your workflow:
|
Contributor
Author
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.

Summary
Fixes 218 test failures across 16 test classes in SalesforceSDK module (APIs 28-34):
kotlin-reflect:2.3.20test dependency to force-align with project's Kotlin 2.3.20 compiler. MockK 1.14.9's transitivekotlin-reflect:2.2.21cannot parse bytecode metadata from newer Kotlin, causingArrayIndexOutOfBoundsExceptioninReflectJavaMember.getValueParameters.@SdkSuppress(minSdkVersion = 31)to 4 test classes that crash withNoClassDefFoundError: android/app/PictureInPictureUiStatedue toandroidx.activity:1.13.0referencing API 31+ framework class.Thread.sleepfrom 200ms to 2000ms inLoginViewModelTestwhere async coroutines weren't completing in time on slower CI runners.Root Cause
Test plan