Commit 99b87139 by ibaker Committed by Christos Tsilopoulos

Change Truth assertions in DashWidevineOfflineTest to increase clarity

PiperOrigin-RevId: 342040610
parent a038b421
......@@ -171,9 +171,9 @@ public final class DashWidevineOfflineTest {
long licenseDuration =
offlineLicenseHelper.getLicenseDurationRemainingSec(offlineLicenseKeySetId).first;
assertWithMessage(
"License duration should be less than 30 sec. " + "Server settings might have changed.")
.that(licenseDuration < 30)
.isTrue();
"License duration should be less than 30 sec. Server settings might have changed.")
.that(licenseDuration)
.isLessThan(30);
while (licenseDuration > 0) {
synchronized (this) {
wait(licenseDuration * 1000 + 2000);
......@@ -182,8 +182,8 @@ public final class DashWidevineOfflineTest {
licenseDuration =
offlineLicenseHelper.getLicenseDurationRemainingSec(offlineLicenseKeySetId).first;
assertWithMessage("License duration should be decreasing.")
.that(previousDuration > licenseDuration)
.isTrue();
.that(licenseDuration)
.isLessThan(previousDuration);
}
// DefaultDrmSessionManager should renew the license and stream play fine
......@@ -203,8 +203,8 @@ public final class DashWidevineOfflineTest {
long licenseDuration = licenseDurationRemainingSec.first;
assertWithMessage(
"License duration should be less than 30 sec. Server settings might have changed.")
.that(licenseDuration < 30)
.isTrue();
.that(licenseDuration)
.isLessThan(30);
ActionSchedule schedule = new ActionSchedule.Builder(TAG)
.waitForPlaybackState(Player.STATE_READY)
.delay(3000).pause().delay(licenseDuration * 1000 + 2000).play().build();
......
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