Format JUnit failure message. Tweaks.

This commit is contained in:
Gary Gregory 2020-07-23 11:11:51 -04:00
parent 7474e5db7a
commit fed91a0559
1 changed files with 3 additions and 3 deletions

View File

@ -96,9 +96,9 @@ public class EventCountCircuitBreakerTest {
public void testNow() {
final EventCountCircuitBreaker breaker = new EventCountCircuitBreaker(OPENING_THRESHOLD, 1,
TimeUnit.SECONDS);
final long now = breaker.now();
final long delta = Math.abs(System.nanoTime() - now);
assertTrue(delta < 100000, String.format("Delta %d ns to current time too large", delta));
final long nowNanos = breaker.now();
final long deltaNanos = Math.abs(System.nanoTime() - nowNanos);
assertTrue(deltaNanos < 100_000, String.format("Delta %,d ns to current time too large", deltaNanos));
}
/**