hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jian He (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7202) End-to-end UT for api-server
Date Wed, 27 Sep 2017 00:23:04 GMT

    [ https://issues.apache.org/jira/browse/YARN-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16181778#comment-16181778

Jian He commented on YARN-7202:

I'm just worried some ended up testing the ServiceClientForTest instead of real code. 
e.g. testBadGetService tests if a service exists or not, and check if the return code is NOT_FOUND.

The test passes because in ServiceClientForTest it implements its own logic to throw IllegalArgumentException
if service-name doesn't equal to the hardcode 'jenkins'. But this is not the case for real
code. In real code, it doesn't throw IllegalArgumentException if service is not found, it
throws YarnException. and the return code won't be NOT_FOUND. So the test becomes moot in
this scenario. 

May be mock particular method (like the rpc methods) instead of overriding the entire serviceClient

> End-to-end UT for api-server
> ----------------------------
>                 Key: YARN-7202
>                 URL: https://issues.apache.org/jira/browse/YARN-7202
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Jian He
>         Attachments: YARN-7202.yarn-native-services.001.patch, YARN-7202.yarn-native-services.002.patch

This message was sent by Atlassian JIRA

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

View raw message