[
https://issues.apache.org/jira/browse/YARN-7202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16182886#comment-16182886
]
Eric Yang commented on YARN-7202:
---------------------------------
[~jianhe] In the example that you provided, it is showing what ApiServer would
behave and what is expected from ServiceClient. If ServiceClient throws
YarnException for NOT_FOUND, and ApiServer does not capturing YarnException to
treat it as NOT_FOUND, then we look at the reason for the discrepancy. We know
ServiceClient will throw YarnException for various errors, including NOT_FOUND.
However, ServiceClient does not provide more details for ApiServer to identify
the difference between NOT_FOUND, and INTERNAL_SERVER_ERROR by looking at
YarnException. Hence, the mocked version of ServiceClient is verifying how
ApiServer would behave under all conditions that ApiServer covered. The
ambiguity does not come from ApiServer. If both mocked version of
ServiceClient, and ApiServer are behaving correctly. The ambiguity problem
must be originated from ServiceClient. This verification confirms that unit
test for ApiServer is done correctly, and problem resides in ServiceClient. If
we peel off layer and layer of ambiguity, then we have a good suite of unit
test cases that can be repeated and reproduced.
ServiceClient code is inherited from Apache Slider. There are too many
integration classes with external dependencies. It won't be easy to write unit
test cases in one task. I would proposed to write unit test cases in separate
JIRAs as we continue to trim down the framework to make up for the technical
debts from Apache Slider.
> 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
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]