-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
StackWalker.Option not found on Mockito 5.1.0 #2890
Comments
Two questions:
|
@TimvdLippe I hope @sergiandreplace doesn't mind if I answer. We're also using Mockito and ran into the very same problem.
Nope. API 33 is the latest version, Android 13. |
@TimvdLippe a colleague of Sergi here! Yes, we are using mockito-android (5.1.0 same version of core). |
@reta if I understand correctly, we would have to revert the StackWalker change, but that would break your integration with the |
@TimvdLippe unexpected, but I agree, we probably have to revert at least the
Yes, I believe we can |
Here's a minimal repro in case you want to test things out (or add an integration test for a basic case):
Note: I used a realistic but pointless mocking setup, also it repros using just ResultsMockito 5.1.0 (committed to repro):
Mockito 5.0.0 (for control, change
Mockito 4.11.0 (for control, change
For reference: https://developer.android.com/reference/classes doesn't have |
FWIW we started an effort to set up some basic Android tests for us: https://github.com/mockito/mockito/tree/main/subprojects/androidTest However, this stalled as we couldn't get it to work on CI. If anybody affected here would like to dedicate some time to prevent these kind of issues from happening, please take a look at the existing test suite and infrastructure and submit a PR to get it passing on CI. |
Signed-off-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: Andriy Redko <drreta@gmail.com>
Fixes #2890 Signed-off-by: Andriy Redko <drreta@gmail.com>
@TimvdLippe @reta Thanks a lot of the awesome fast reaction & fix. Great. |
Wow, that was fast. Thanks a lot for the solution! |
Confirmed working on the PR I had linked above. Is there a tracking issue for Android CI? |
@TWiStErRob thank you!
Yes, #2892 |
A quick update for watchers and posterity. The above problem was caused by removing Java 8 support in this PR, and the fix was to partially revert the removal. After the fix and patch release, we added Android CI with reta (reviewed by TimvdLippe):
CI: mockito/.github/workflows/ci.yml Lines 88 to 125 in ebdca97
Android Integration test project: https://github.com/mockito/mockito/tree/main/subprojects/androidTest |
We have an Android project using Mockito and we tried to upgrade from 5.0.0 to 5.1.0.
When running the Android tests we always receive an error like this:
After some investigation we found that:
It looks like a very specific Android issue.
For the meantime, we will halt the upgrade, but any help will be great.
Thanks in advance
Note that some configuration are impossible to mock via Mockito
(same as any question on stackoverflow.com)
The text was updated successfully, but these errors were encountered: