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