Commit bb33d568 by tonihei Committed by Oliver Woodman

Remove test-specific ActionSchedule tags

There is no need for that, updating them is often forgotten and
takes up too much line space. Replace by a single TAG per test class.

PiperOrigin-RevId: 300113072
parent 0d230d51
......@@ -69,6 +69,8 @@ import org.robolectric.annotation.LooperMode.Mode;
@LooperMode(Mode.PAUSED)
public final class AnalyticsCollectorTest {
private static final String TAG = "AnalyticsCollectorTest";
private static final int EVENT_PLAYER_STATE_CHANGED = 0;
private static final int EVENT_TIMELINE_CHANGED = 1;
private static final int EVENT_POSITION_DISCONTINUITY = 2;
......@@ -309,7 +311,7 @@ public final class AnalyticsCollectorTest {
new FakeMediaSource(SINGLE_PERIOD_TIMELINE, ExoPlayerTestRunner.Builder.VIDEO_FORMAT),
new FakeMediaSource(SINGLE_PERIOD_TIMELINE, ExoPlayerTestRunner.Builder.AUDIO_FORMAT));
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.pause()
.waitForPlaybackState(Player.STATE_READY)
.seek(/* windowIndex= */ 1, /* positionMs= */ 0)
......@@ -379,7 +381,7 @@ public final class AnalyticsCollectorTest {
long periodDurationMs =
SINGLE_PERIOD_TIMELINE.getWindow(/* windowIndex= */ 0, new Window()).getDurationMs();
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.pause()
.waitForPlaybackState(Player.STATE_READY)
.playUntilPosition(/* windowIndex= */ 0, periodDurationMs)
......@@ -460,7 +462,7 @@ public final class AnalyticsCollectorTest {
MediaSource mediaSource2 =
new FakeMediaSource(SINGLE_PERIOD_TIMELINE, ExoPlayerTestRunner.Builder.VIDEO_FORMAT);
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.pause()
.waitForPlaybackState(Player.STATE_READY)
.setMediaSources(/* resetPosition= */ false, mediaSource2)
......@@ -536,7 +538,7 @@ public final class AnalyticsCollectorTest {
MediaSource mediaSource =
new FakeMediaSource(SINGLE_PERIOD_TIMELINE, ExoPlayerTestRunner.Builder.VIDEO_FORMAT);
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.pause()
.waitForPlaybackState(Player.STATE_READY)
.throwPlaybackException(ExoPlaybackException.createForSource(new IOException()))
......@@ -611,7 +613,7 @@ public final class AnalyticsCollectorTest {
long periodDurationMs =
SINGLE_PERIOD_TIMELINE.getWindow(/* windowIndex= */ 0, new Window()).getDurationMs();
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.pause()
.waitForPlaybackState(Player.STATE_READY)
// Ensure second period is already being read from.
......@@ -687,7 +689,7 @@ public final class AnalyticsCollectorTest {
MediaSource fakeMediaSource =
new FakeMediaSource(SINGLE_PERIOD_TIMELINE, ExoPlayerTestRunner.Builder.VIDEO_FORMAT);
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.pause()
.waitForPlaybackState(Player.STATE_READY)
.addMediaSources(fakeMediaSource)
......@@ -778,7 +780,7 @@ public final class AnalyticsCollectorTest {
FakeMediaSource fakeMediaSource =
new FakeMediaSource(adTimeline, ExoPlayerTestRunner.Builder.VIDEO_FORMAT);
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.executeRunnable(
new PlayerRunnable() {
@Override
......@@ -1004,7 +1006,7 @@ public final class AnalyticsCollectorTest {
FakeMediaSource fakeMediaSource =
new FakeMediaSource(adTimeline, ExoPlayerTestRunner.Builder.VIDEO_FORMAT);
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.pause()
// Ensure everything is preloaded.
.waitForIsLoading(true)
......@@ -1112,7 +1114,7 @@ public final class AnalyticsCollectorTest {
public void notifyExternalEvents() throws Exception {
MediaSource mediaSource = new FakeMediaSource(SINGLE_PERIOD_TIMELINE);
ActionSchedule actionSchedule =
new ActionSchedule.Builder("AnalyticsCollectorTest")
new ActionSchedule.Builder(TAG)
.pause()
.waitForPlaybackState(Player.STATE_READY)
.executeRunnable(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment