[ https://issues.apache.org/jira/browse/HADOOP-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13924273#comment-13924273 ]
Akira AJISAKA commented on HADOOP-3679: --------------------------------------- Thanks for taking this issue! The fix of the assertion orderings looks mostly good. Three comments: {code} + public static long ID_EXPECTED=Long.MAX_VALUE; + @Test public void testConstructor() { - FileHandle handle = new FileHandle(1024); + FileHandle handle = new FileHandle(ID_EXPECTED); {code} 1. This changes the test itself. Would you please separate changing the parameter from the patch? {code} + assertEquals(check.length, + dob.getLength()); {code} 2. The lines like the above can be converted to one line. 3. Conversely, this patch adds the lines over 80 characters, so please render the lines within 80 chars. > calls to junit Assert::assertEquals invert arguments, causing misleading > error messages, other minor improvements. > ------------------------------------------------------------------------------------------------------------------ > > Key: HADOOP-3679 > URL: https://issues.apache.org/jira/browse/HADOOP-3679 > Project: Hadoop Common > Issue Type: Test > Components: test > Reporter: Chris Douglas > Priority: Minor > Attachments: HADOOP-3679.2.patch, HADOOP-3679.3.patch, > HADOOP-3679.patch > > > JUnit Assert::assertEquals takes its expected and actual arguments in a > particular order, but many unit tests invert them. The error message from a > failed assertion can be misleading. -- This message was sent by Atlassian JIRA (v6.2#6252)