From 99b87139dfe2415b9d8b3fe8c3beef5ff743d07b Mon Sep 17 00:00:00 2001 From: ibaker Date: Thu, 12 Nov 2020 15:07:21 +0000 Subject: [PATCH] Change Truth assertions in DashWidevineOfflineTest to increase clarity PiperOrigin-RevId: 342040610 --- .../playbacktests/gts/DashWidevineOfflineTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java index b657c10d22..8e6a9ce5bc 100644 --- a/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java +++ b/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashWidevineOfflineTest.java @@ -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();