Skip to content

Bump Robolectric to 4.15.1 #2590

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion constants.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ project.ext {
kotlinxCoroutinesVersion = '1.9.0'
leakCanaryVersion = '2.10'
mockitoVersion = '3.12.4'
robolectricVersion = '4.14.1'
robolectricVersion = '4.15.1'
// Keep this in sync with Google's internal Checker Framework version.
checkerframeworkVersion = '3.13.0'
errorProneVersion = '2.18.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowLooper;

/** End-to-end tests using DASH samples. */
@RunWith(AndroidJUnit4.class)
Expand Down Expand Up @@ -357,6 +358,9 @@ public void onLoadCompleted(
.ignoringNonFatalErrors()
.untilBackgroundThreadCondition(() -> secondSubtitleFailureCount.get() == 4);
secondSubtitleResolves.set(true);

ShadowLooper.runUiThreadTasks();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain what issue this is addressing and how it is solved by this line.

In any case I think I'd prefer to separate bumping the version and applying a fix for the dash playback test. When I add this line without bumping the version it appears that this would work as well, so I think these two changes can be separated.

If you can provide me with the reasoning for this change here, I can do a CL internally that bumps the robolectric version and we can then turn this change here to a commit that addresses the problem you are seeing.

Copy link
Author

Choose a reason for hiding this comment

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

This change is safe on the old version, and is used to avoid extra Robolectrie's looper left runnable checking. I can send a new PR for this change separately with old Robolectric version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be great to split this, yes!

Copy link
Author

Choose a reason for hiding this comment

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

#2628 New pr for test code changes.


advance(player)
.ignoringNonFatalErrors()
.untilBackgroundThreadCondition(secondSubtitleChunkLoaded::get);
Expand Down