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

Colin Patrick McCabe commented on HADOOP-10624:
-----------------------------------------------

Looks good overall.  Can you get rid of the switch statements and just pass in 
the values that you want to test?

For example you could have:
{code}
    hadoop_lerr_alloc_test(RUNTIME_EXCEPTION_ERROR_CODE,
        "org.apache.hadoop.native.HadoopCore.RuntimeException: ");
{code}

and then have {{hadoop_lerr_alloc_test}} call {{hadoop_lerr_alloc}} and check 
the result of {{hadoop_err_msg}} against the string that was passed in.  It 
makes more sense to me to pass in the string than to have a case statement like 
that.

> Fix some minors typo and add more test cases for hadoop_err
> -----------------------------------------------------------
>
>                 Key: HADOOP-10624
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10624
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: HADOOP-10388
>            Reporter: Wenwu Peng
>            Assignee: Wenwu Peng
>         Attachments: HADOOP-10624-pnative.001.patch
>
>
> Changes:
> 1. Add more test cases to cover method hadoop_lerr_alloc and 
> hadoop_uverr_alloc
> 2. Fix typo as following:
>     1) Change hadoop_uverr_alloc(int cod to hadoop_uverr_alloc(int code in 
> hadoop_err.h
>     2) Change OutOfMemory to OutOfMemoryException to consistent with other 
> Exception in hadoop_err.c
>     3) Change DBUG to DEBUG in messenger.c
>     4) Change DBUG to DEBUG in reactor.c



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to