mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-10 03:55:10 +00:00
Format JUnit failure message. Tweaks.
This commit is contained in:
parent
7474e5db7a
commit
fed91a0559
@ -96,9 +96,9 @@ public void testInitiallyClosed() {
|
|||||||
public void testNow() {
|
public void testNow() {
|
||||||
final EventCountCircuitBreaker breaker = new EventCountCircuitBreaker(OPENING_THRESHOLD, 1,
|
final EventCountCircuitBreaker breaker = new EventCountCircuitBreaker(OPENING_THRESHOLD, 1,
|
||||||
TimeUnit.SECONDS);
|
TimeUnit.SECONDS);
|
||||||
final long now = breaker.now();
|
final long nowNanos = breaker.now();
|
||||||
final long delta = Math.abs(System.nanoTime() - now);
|
final long deltaNanos = Math.abs(System.nanoTime() - nowNanos);
|
||||||
assertTrue(delta < 100000, String.format("Delta %d ns to current time too large", delta));
|
assertTrue(deltaNanos < 100_000, String.format("Delta %,d ns to current time too large", deltaNanos));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user