This commit is contained in:
Marcin Grzejszczak
2021-02-19 09:41:17 +01:00
parent a99ac0fced
commit f6f41bd41d

View File

@@ -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