HADOOP-14218. Replace assertThat with assertTrue in MetricsAsserts.
(cherry picked from commit 448ec81fd7133f413853570f116d5f6e16f68bd9)
This commit is contained in:
parent
b7b9d74521
commit
643298b282
@ -27,7 +27,6 @@
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.mockito.internal.matchers.GreaterThan;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
|
||||
import org.mockito.ArgumentCaptor;
|
||||
@ -322,8 +321,8 @@ public static void assertCounter(String name, long expected,
|
||||
*/
|
||||
public static void assertCounterGt(String name, long greater,
|
||||
MetricsRecordBuilder rb) {
|
||||
Assert.assertThat("Bad value for metric " + name, getLongCounter(name, rb),
|
||||
new GreaterThan<Long>(greater));
|
||||
Assert.assertTrue("Bad value for metric " + name,
|
||||
getLongCounter(name, rb) > greater);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -345,8 +344,8 @@ public static void assertCounterGt(String name, long greater,
|
||||
*/
|
||||
public static void assertGaugeGt(String name, double greater,
|
||||
MetricsRecordBuilder rb) {
|
||||
Assert.assertThat("Bad value for metric " + name, getDoubleGauge(name, rb),
|
||||
new GreaterThan<Double>(greater));
|
||||
Assert.assertTrue("Bad value for metric " + name,
|
||||
getDoubleGauge(name, rb) > greater);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user