From 03b0d9d46c48ff4ef03928ca6cb4cc6fe571224d Mon Sep 17 00:00:00 2001 From: tonihei Date: Sun, 3 Dec 2017 11:25:51 -0800 Subject: [PATCH] Fix flaky testEmptyTimeline again. Waiting for the timeline change didn't work correctly because the timeline was already equal to Timeline.EMPTY (due to the masking). Now waiting explicitly for the empty Timeline exposed by the source. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177749292 --- .../java/com/google/android/exoplayer2/ExoPlayerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/androidTest/java/com/google/android/exoplayer2/ExoPlayerTest.java b/library/core/src/androidTest/java/com/google/android/exoplayer2/ExoPlayerTest.java index 2443f8b892..714dfff676 100644 --- a/library/core/src/androidTest/java/com/google/android/exoplayer2/ExoPlayerTest.java +++ b/library/core/src/androidTest/java/com/google/android/exoplayer2/ExoPlayerTest.java @@ -54,7 +54,7 @@ public final class ExoPlayerTest extends TestCase { * error. */ public void testPlayEmptyTimeline() throws Exception { - Timeline timeline = Timeline.EMPTY; + Timeline timeline = new FakeTimeline(/* windowCount= */ 0); FakeRenderer renderer = new FakeRenderer(); // TODO(b/69665207): Without waiting for the timeline update, this test is flaky as the timeline // update happens after the transition to STATE_ENDED and the test runner may already have been