[ 
https://issues.apache.org/jira/browse/MAPREDUCE-7197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16902028#comment-16902028
 ] 

Adam Antal commented on MAPREDUCE-7197:
---------------------------------------

Thanks for reviewing this huge patch [~snemeth], appreciated!

Resolved 1,2,4,5,7,8,10,12. Thanks!

Item 3 is not applicable since when {{isEqualTo}} is called on the 
{{Assertion}} it is immediately processed, and the {{withFailMessage}} is not 
going to have any effect. IntelliJ also warns you about this.

Regrading Item 6 I totally agree with you. I replace several other occasions of 
this all along this testcase.

Item 9: Nice catch. Sorry, I somehow missed it.

Item 11: I've found the {{containsExactly}} method for comparing two {{Arrays}} 
in the {{org.assertj.core.api.Assertions}} package. I used that one.

Uploaded patch  [^MAPREDUCE-7197.005.patch].

> Fix order of actual and expected expression in assert statements
> ----------------------------------------------------------------
>
>                 Key: MAPREDUCE-7197
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7197
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>    Affects Versions: 3.2.0
>            Reporter: Adam Antal
>            Assignee: Adam Antal
>            Priority: Major
>         Attachments: MAPREDUCE-7197.001.patch, MAPREDUCE-7197.002.patch, 
> MAPREDUCE-7197.003.patch, MAPREDUCE-7197.004.patch, MAPREDUCE-7197.004.patch, 
> MAPREDUCE-7197.005.patch, old-approx-from-HADOOP-12693
>
>
> Fix order of actual and expected expression in assert statements which gives 
> misleading message when test case fails. Attached file has some of the places 
> where it is placed wrongly.
> {code:java}
> [ERROR] 
> testNodeRemovalGracefully(org.apache.hadoop.yarn.server.resourcemanager.TestResourceTrackerService)
>   Time elapsed: 3.385 s  <<< FAILURE!
> java.lang.AssertionError: Shutdown nodes should be 0 now expected:<1> but 
> was:<0>
> {code}
> For long term, [AssertJ|http://joel-costigliola.github.io/assertj/] can be 
> used for new test cases which avoids such mistakes.
> This is a follow-up Jira on the fix for the MR project.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to