CompositionPlayerTest: increase timeout for emulator tests

Some tests are sometimes timing out because the emulator is too slow.

PiperOrigin-RevId: 713671851
This commit is contained in:
kimvde 2025-01-09 07:53:57 -08:00 committed by Copybara-Service
parent cd511ea60b
commit 2df50f209e

View File

@ -16,6 +16,7 @@
package androidx.media3.transformer;
import static androidx.media3.common.PlaybackException.ERROR_CODE_DECODER_INIT_FAILED;
import static androidx.media3.common.util.Util.isRunningOnEmulator;
import static androidx.media3.transformer.AndroidTestUtil.JPG_SINGLE_PIXEL_ASSET;
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET;
import static com.google.common.truth.Truth.assertThat;
@ -77,7 +78,7 @@ import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class CompositionPlayerTest {
private static final long TEST_TIMEOUT_MS = 10_000;
private static final long TEST_TIMEOUT_MS = isRunningOnEmulator() ? 20_000 : 10_000;
@Rule
public ActivityScenarioRule<SurfaceTestActivity> rule =