mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Change Truth assertions in DashWidevineOfflineTest to increase clarity
PiperOrigin-RevId: 342040610
This commit is contained in:
parent
a038b421dd
commit
99b87139df
1 changed files with 7 additions and 7 deletions
|
|
@ -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 {
|
||||||
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 {
|
||||||
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();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue