Add time units to playing time failure message in ExoHostedTest

PiperOrigin-RevId: 339864290
This commit is contained in:
ibaker 2020-10-30 14:02:31 +00:00 committed by Oliver Woodman
parent 6a5b53355b
commit c71f1b04e9

View File

@ -168,7 +168,7 @@ public abstract class ExoHostedTest implements AnalyticsListener, HostedTest {
long minAllowedActualPlayingTimeMs = playingTimeToAssertMs - MAX_PLAYING_TIME_DISCREPANCY_MS; long minAllowedActualPlayingTimeMs = playingTimeToAssertMs - MAX_PLAYING_TIME_DISCREPANCY_MS;
long maxAllowedActualPlayingTimeMs = playingTimeToAssertMs + MAX_PLAYING_TIME_DISCREPANCY_MS; long maxAllowedActualPlayingTimeMs = playingTimeToAssertMs + MAX_PLAYING_TIME_DISCREPANCY_MS;
assertWithMessage( assertWithMessage(
"Total playing time: " + totalPlayingTimeMs + ". Expected: " + playingTimeToAssertMs) "Total playing time: %sms. Expected: %sms", totalPlayingTimeMs, playingTimeToAssertMs)
.that( .that(
minAllowedActualPlayingTimeMs <= totalPlayingTimeMs minAllowedActualPlayingTimeMs <= totalPlayingTimeMs
&& totalPlayingTimeMs <= maxAllowedActualPlayingTimeMs) && totalPlayingTimeMs <= maxAllowedActualPlayingTimeMs)