Skip failing test on API 31 emulator

PiperOrigin-RevId: 700722123
This commit is contained in:
kimvde 2024-11-27 09:14:52 -08:00 committed by Copybara-Service
parent 52e45e0864
commit c861947bee

View File

@ -17,6 +17,7 @@
package androidx.media3.transformer;
import static androidx.media3.common.util.Assertions.checkNotNull;
import static androidx.media3.common.util.Util.isRunningOnEmulator;
import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE_LUMA;
import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888;
import static androidx.media3.test.utils.BitmapPixelTestUtil.maybeSaveTestBitmap;
@ -25,6 +26,7 @@ import static androidx.media3.transformer.AndroidTestUtil.JPG_ASSET;
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET;
import static androidx.media3.transformer.AndroidTestUtil.assumeFormatsSupported;
import static androidx.media3.transformer.AndroidTestUtil.extractBitmapsFromVideo;
import static androidx.media3.transformer.AndroidTestUtil.recordTestSkipped;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
@ -49,6 +51,7 @@ import com.google.common.collect.ImmutableList;
import java.io.File;
import java.io.IOException;
import java.util.List;
import org.junit.AssumptionViolatedException;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@ -232,6 +235,11 @@ public final class TransformerMultiSequenceCompositionTest {
@Test
public void export_completesWithConsistentFrameCount() throws Exception {
if (isRunningOnEmulator() && Util.SDK_INT == 31) {
// The decoder is failing on API 31 emulator.
recordTestSkipped(context, testId, /* reason= */ "Skipped due to failing decoder");
throw new AssumptionViolatedException("Skipped due to failing decoder");
}
assumeFormatsSupported(
context,
testId,