You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2015/10/10 14:11:05 UTC

[jira] [Created] (HADOOP-12472) Make GenericTestUtils.assertExceptionContains robust

Steve Loughran created HADOOP-12472:
---------------------------------------

             Summary: Make GenericTestUtils.assertExceptionContains robust
                 Key: HADOOP-12472
                 URL: https://issues.apache.org/jira/browse/HADOOP-12472
             Project: Hadoop Common
          Issue Type: Improvement
          Components: test
    Affects Versions: 3.0.0
            Reporter: Steve Loughran


{{GenericTestUtils.assertExceptionContains}} calls {{Exception.getMessage()}}, followed by msg.contains().

This will NPE for an exception with a null message, such as NPE.

# it should call toString()
# and do an assertNotNull on the result in case some subclass does something very bad
# and for safety, check the asser



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)