From 3dae045487d1f0027f867dc234e632384df87381 Mon Sep 17 00:00:00 2001 From: ibaker Date: Thu, 11 Mar 2021 16:27:33 +0000 Subject: [PATCH] Deflake ClippedPlaybackTest PiperOrigin-RevId: 362298115 --- .../java/com/google/android/exoplayer2/ClippedPlaybackTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/core/src/androidTest/java/com/google/android/exoplayer2/ClippedPlaybackTest.java b/library/core/src/androidTest/java/com/google/android/exoplayer2/ClippedPlaybackTest.java index b7f05b0869..9e757574b8 100644 --- a/library/core/src/androidTest/java/com/google/android/exoplayer2/ClippedPlaybackTest.java +++ b/library/core/src/androidTest/java/com/google/android/exoplayer2/ClippedPlaybackTest.java @@ -82,6 +82,7 @@ public final class ClippedPlaybackTest { playbackEnded.block(); getInstrumentation().runOnMainSync(() -> player.get().release()); + getInstrumentation().waitForIdleSync(); assertThat(Iterables.getOnlyElement(Iterables.concat(textOutput.cues)).text.toString()) .isEqualTo("This is the first subtitle."); } @@ -135,6 +136,7 @@ public final class ClippedPlaybackTest { playbackEnded.block(); getInstrumentation().runOnMainSync(() -> player.get().release()); + getInstrumentation().waitForIdleSync(); assertThat(Iterables.getOnlyElement(Iterables.concat(textOutput.cues)).text.toString()) .isEqualTo("This is the first subtitle."); }