Skip to content

Fix test execution on Robolectric#8822

Merged
squarejesse merged 2 commits into
masterfrom
jwilson.0529.robolectric
May 29, 2025
Merged

Fix test execution on Robolectric#8822
squarejesse merged 2 commits into
masterfrom
jwilson.0529.robolectric

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

We had a regression in 5.0.0-alpha.15 that broke test execution on Robolectric. Now that works again.

Closes: #8821

We had a regression in 5.0.0-alpha.15 that broke test execution
on Robolectric. Now that works again.

Closes: #8821
@squarejesse squarejesse added android Relates to usage specifically on Android android-regression Run a PR against regression tests labels May 29, 2025
@squarejesse
squarejesse merged commit 54cbf31 into master May 29, 2025
@squarejesse
squarejesse deleted the jwilson.0529.robolectric branch May 29, 2025 16:52

// If the API version is 0, assume this is the Android artifact, but running on the JVM.
// Robolectric?
if (Build.VERSION.SDK_INT == 0) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change

@yschimke

yschimke commented Jun 5, 2025

Copy link
Copy Markdown
Collaborator

Added a test in #8844

Note: robolectric was already tested, this was failing on an Android unit test that didn't have the robolectric runner configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Relates to usage specifically on Android android-regression Run a PR against regression tests

Development

Successfully merging this pull request may close these issues.

Crash initializing AndroidPlatform in a test, ‘Expected Android API level 21+ but was 0’

4 participants