hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira Ajisaka (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-14218) Replace assertThat with assertTrue in MetricsAsserts
Date Thu, 23 Mar 2017 08:08:41 GMT
Akira Ajisaka created HADOOP-14218:
--------------------------------------

             Summary: Replace assertThat with assertTrue in MetricsAsserts
                 Key: HADOOP-14218
                 URL: https://issues.apache.org/jira/browse/HADOOP-14218
             Project: Hadoop Common
          Issue Type: Test
            Reporter: Akira Ajisaka
            Assignee: Akira Ajisaka
            Priority: Minor


{code:title=MetricsAsserts.java}
  public static void assertCounterGt(String name, long greater,
                                     MetricsRecordBuilder rb) {
    Assert.assertThat("Bad value for metric " + name, getLongCounter(name, rb),
        new GreaterThan<Long>(greater));
  }
{code}
The following code cannot be compiled with Mockito 2.1+ because it does not depend on org.hamcrest.Matcher
anymore. We can simply replace this code with {{assertTrue(message, getLongCounter() >
greater)}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message