Fix metrics test race

Sometimes a dev machine can be fast enough that birthTime is the same as
currentTime. That's ok.

Change-Id: I5901580bfc41ae844a456d306bf0c41349727c25
This commit is contained in:
Nasser Grainawi
2015-11-12 12:31:42 -08:00
parent eb912bb21f
commit f27933a919

View File

@@ -56,7 +56,7 @@ public class ProcMetricModuleTest {
@Test
public void testProcUptime() {
Gauge<Long> birth = gauge("proc/birth_timestamp");
assertThat(birth.getValue()).isLessThan(
assertThat(birth.getValue()).isAtMost(
TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis()));
Gauge<Long> uptime = gauge("proc/uptime");