You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-dev@hadoop.apache.org by "Adam Antal (JIRA)" <ji...@apache.org> on 2019/04/18 13:59:00 UTC

[jira] [Created] (MAPREDUCE-7197) Fix order of actual and expected expression in assert statements

Adam Antal created MAPREDUCE-7197:
-------------------------------------

             Summary: 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
         Attachments: 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.3#76005)

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