Merge "Include compared values in assertion messages." into mainline-prod
diff --git a/tests/client/src/com/android/providers/media/client/PerformanceTest.java b/tests/client/src/com/android/providers/media/client/PerformanceTest.java
index 867d459..72b4234 100644
--- a/tests/client/src/com/android/providers/media/client/PerformanceTest.java
+++ b/tests/client/src/com/android/providers/media/client/PerformanceTest.java
@@ -16,6 +16,8 @@
 
 package com.android.providers.media.client;
 
+import static com.google.common.truth.Truth.assertThat;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -83,15 +85,15 @@
 
         // Verify that core actions finished within 30ms deadline
         final long actionDeadline = 30;
-        assertTrue(timers.actionInsert.getAverageDurationMillis() < actionDeadline);
-        assertTrue(timers.actionUpdate.getAverageDurationMillis() < actionDeadline);
-        assertTrue(timers.actionDelete.getAverageDurationMillis() < actionDeadline);
+        assertThat(timers.actionInsert.getAverageDurationMillis()).isLessThan(actionDeadline);
+        assertThat(timers.actionUpdate.getAverageDurationMillis()).isLessThan(actionDeadline);
+        assertThat(timers.actionDelete.getAverageDurationMillis()).isLessThan(actionDeadline);
 
         // Verify that external notifications finished within 30ms deadline
         final long notifyDeadline = 30;
-        assertTrue(timers.notifyInsert.getAverageDurationMillis() < notifyDeadline);
-        assertTrue(timers.notifyUpdate.getAverageDurationMillis() < notifyDeadline);
-        assertTrue(timers.notifyDelete.getAverageDurationMillis() < notifyDeadline);
+        assertThat(timers.notifyInsert.getAverageDurationMillis()).isLessThan(notifyDeadline);
+        assertThat(timers.notifyUpdate.getAverageDurationMillis()).isLessThan(notifyDeadline);
+        assertThat(timers.notifyDelete.getAverageDurationMillis()).isLessThan(notifyDeadline);
     }
 
     private void doSingle(Uri collection, Timers timers) throws Exception {
@@ -162,15 +164,15 @@
 
         // Verify that core actions finished within 30ms deadline
         final long actionDeadline = 30 * COUNT_BULK;
-        assertTrue(timers.actionInsert.getAverageDurationMillis() < actionDeadline);
-        assertTrue(timers.actionUpdate.getAverageDurationMillis() < actionDeadline);
-        assertTrue(timers.actionDelete.getAverageDurationMillis() < actionDeadline);
+        assertThat(timers.actionInsert.getAverageDurationMillis()).isLessThan(actionDeadline);
+        assertThat(timers.actionUpdate.getAverageDurationMillis()).isLessThan(actionDeadline);
+        assertThat(timers.actionDelete.getAverageDurationMillis()).isLessThan(actionDeadline);
 
         // Verify that external notifications finished within 100ms deadline
         final long notifyDeadline = 100;
-        assertTrue(timers.notifyInsert.getAverageDurationMillis() < notifyDeadline);
-        assertTrue(timers.notifyUpdate.getAverageDurationMillis() < notifyDeadline);
-        assertTrue(timers.notifyDelete.getAverageDurationMillis() < notifyDeadline);
+        assertThat(timers.notifyInsert.getAverageDurationMillis()).isLessThan(notifyDeadline);
+        assertThat(timers.notifyUpdate.getAverageDurationMillis()).isLessThan(notifyDeadline);
+        assertThat(timers.notifyDelete.getAverageDurationMillis()).isLessThan(notifyDeadline);
     }
 
     private void doBulk(Uri collection, Timers timers) throws Exception {