diff --git a/spring-cloud-sleuth-autoconfigure/src/test/java/org/springframework/cloud/sleuth/autoconfig/wavefront/WavefrontTracingIntegrationTests.java b/spring-cloud-sleuth-autoconfigure/src/test/java/org/springframework/cloud/sleuth/autoconfig/wavefront/WavefrontTracingIntegrationTests.java index a3ae83c31..2f3ced05c 100644 --- a/spring-cloud-sleuth-autoconfigure/src/test/java/org/springframework/cloud/sleuth/autoconfig/wavefront/WavefrontTracingIntegrationTests.java +++ b/spring-cloud-sleuth-autoconfigure/src/test/java/org/springframework/cloud/sleuth/autoconfig/wavefront/WavefrontTracingIntegrationTests.java @@ -91,7 +91,7 @@ public class WavefrontTracingIntegrationTests { assertThat(spanRecord.name).isEqualTo("GET /api/fn/{id}"); // spot check the unit is valid (millis not micros) - long currentTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()); + long currentTime = System.currentTimeMillis(); assertThat(spanRecord.startMillis).isGreaterThan(currentTime - 5000).isLessThan(currentTime); // Less than a millis should round up to 1, but the test could take longer than // 1ms