Commit be68d13b by ibaker Committed by Oliver Woodman

Throw RuntimeException instead of Error from ExoHostedTest

Throwing Error forces a test to catch Throwable (e.g.
DashWidevineOfflineTest#widevineOfflineReleasedV22), which will also
catch AssertionError meaning the fail() call at the end of the try block
won't work.

The DashWidevineOfflineTest have been broken since
https://github.com/google/ExoPlayer/commit/91185500a1242b99b86b18bc9f3449d3dac1fa01

PiperOrigin-RevId: 331120894
parent b9ed9ee3
......@@ -157,7 +157,7 @@ public abstract class ExoHostedTest implements AnalyticsListener, HostedTest {
@Override
public final void onFinished() {
if (failOnPlayerError && playerError != null) {
throw new Error(playerError);
throw new RuntimeException(playerError);
}
logMetrics(audioDecoderCounters, videoDecoderCounters);
if (expectedPlayingTimeMs != EXPECTED_PLAYING_TIME_UNSET) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment