Skip to content

Commit fe5511c

Browse files
committed
benchmarks: Use Truth in LoadWorkerTest
This will produce better error messages when the comparisons fail. This is to help debug aarch64 test failures.
1 parent 80f1cbf commit fe5511c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

benchmarks/src/test/java/io/grpc/benchmarks/driver/LoadWorkerTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package io.grpc.benchmarks.driver;
1818

19-
import static org.junit.Assert.assertTrue;
19+
import static com.google.common.truth.Truth.assertThat;
2020
import static org.junit.Assert.fail;
2121

2222
import io.grpc.ManagedChannel;
@@ -194,12 +194,12 @@ private void assertWorkOccurred(StreamObserver<Control.ClientArgs> clientObserve
194194
}
195195
}
196196
clientObserver.onCompleted();
197-
assertTrue(stat.hasLatencies());
198-
assertTrue(stat.getLatencies().getCount() < stat.getLatencies().getSum());
197+
assertThat(stat.hasLatencies()).isTrue();
198+
assertThat(stat.getLatencies().getCount()).isLessThan(stat.getLatencies().getSum());
199199
double mean = stat.getLatencies().getSum() / stat.getLatencies().getCount();
200200
System.out.println("Mean " + mean + " us");
201-
assertTrue(mean > stat.getLatencies().getMinSeen());
202-
assertTrue(mean < stat.getLatencies().getMaxSeen());
201+
assertThat(stat.getLatencies().getMinSeen()).isLessThan(mean);
202+
assertThat(stat.getLatencies().getMaxSeen()).isGreaterThan(mean);
203203
}
204204

205205
private StreamObserver<Control.ClientArgs> startClient(Control.ClientArgs clientArgs)

0 commit comments

Comments
 (0)