mirror of
https://github.com/androidx/media.git
synced 2025-05-17 04:29:55 +08:00
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
91185500a1
PiperOrigin-RevId: 331120894
This commit is contained in:
parent
b9ed9ee379
commit
be68d13ba5
@ -157,7 +157,7 @@ public abstract class ExoHostedTest implements AnalyticsListener, HostedTest {
|
|||||||
@Override
|
@Override
|
||||||
public final void onFinished() {
|
public final void onFinished() {
|
||||||
if (failOnPlayerError && playerError != null) {
|
if (failOnPlayerError && playerError != null) {
|
||||||
throw new Error(playerError);
|
throw new RuntimeException(playerError);
|
||||||
}
|
}
|
||||||
logMetrics(audioDecoderCounters, videoDecoderCounters);
|
logMetrics(audioDecoderCounters, videoDecoderCounters);
|
||||||
if (expectedPlayingTimeMs != EXPECTED_PLAYING_TIME_UNSET) {
|
if (expectedPlayingTimeMs != EXPECTED_PLAYING_TIME_UNSET) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user