Skip to content
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

Instrumentation test suite passes again #13836

Conversation

jamesonwilliams
Copy link
Contributor

@jamesonwilliams jamesonwilliams commented Dec 11, 2024

Contributor checklist

  • Pixel 8 API 34 emulator
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Currently when I run the connect device suite, e.g., ./gradlew clean :Signal-Android:connectedAndroidTest, V2ConversationItemShapeTest will fail with errors like this:

org.thoughtcrime.securesms.conversation.v2.items.V2ConversationItemShapeTest > givenNextAndPreviousMessageDoNotExist_whenISetMessageShape_thenIExpectSingle[Pixel_8_API_34(AVD) - 14]
        io.mockk.MockKException: Can't instantiate proxy for class com.bumptech.glide.RequestManager
        at io.mockk.impl.instantiation.JvmMockFactory.newProxy(JvmMockFactory.kt:64)

Instead of using MockK in the Instrumentation tests, we should probably be using some real objects (or our own fakes). A simple solution, sufficient to get the test passing again, is to replace the mocks with real components.

Testing

After changes:

./gradlew clean :Signal-Android:connectedAndroidTest

[...snip...]
Finished 298 tests on Pixel_8_API_34(AVD) - 14

BUILD SUCCESSFUL in 28m
463 actionable tasks: 433 executed, 30 up-to-date
./gradlew qa

[...snip...]

BUILD SUCCESSFUL in 4m 19s
1020 actionable tasks: 180 executed, 840 up-to-date

greyson-signal pushed a commit that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant