mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Make timeout longer for emulators
Some test is flaky because frame processing is quite slow and triggered this time out. PiperOrigin-RevId: 650191068
This commit is contained in:
parent
f55c09cfe2
commit
b4722ef1ea
@ -74,7 +74,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
* operation takes a long time to finish, the timeout could be a result of slow GL operation back
|
||||
* pressured the decoder, and the decoder is not able to decode another frame.
|
||||
*/
|
||||
private static final long SURFACE_TEXTURE_TIMEOUT_MS = isRunningOnEmulator() ? 10_000 : 500;
|
||||
private static final long SURFACE_TEXTURE_TIMEOUT_MS = isRunningOnEmulator() ? 20_000 : 500;
|
||||
|
||||
// Wait delay between checking whether a registered frame arrives on the SurfaceTexture.
|
||||
private static final long SURFACE_TEXTURE_WAIT_DELAY_MS = 10;
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
package androidx.media3.transformer;
|
||||
|
||||
import static androidx.media3.common.util.Util.isRunningOnEmulator;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.FORCE_TRANSCODE_VIDEO_EFFECTS;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.assumeFormatsSupported;
|
||||
@ -53,6 +54,8 @@ import org.junit.runner.RunWith;
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ForceEndOfStreamTest {
|
||||
|
||||
// Referenced from ExternalTextureManager
|
||||
private static final long SURFACE_TEXTURE_TIMEOUT_MS = isRunningOnEmulator() ? 20_000 : 500;
|
||||
private final Context context = ApplicationProvider.getApplicationContext();
|
||||
@Rule public final TestName testName = new TestName();
|
||||
|
||||
@ -125,6 +128,7 @@ public class ForceEndOfStreamTest {
|
||||
context,
|
||||
new FrameDroppingDecoderFactory(context, MP4_ASSET.videoFrameCount, framesToSkip),
|
||||
Clock.DEFAULT))
|
||||
.setMaxDelayBetweenMuxerSamplesMs(SURFACE_TEXTURE_TIMEOUT_MS)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user