You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Sean Po (JIRA)" <ji...@apache.org> on 2016/08/24 23:03:21 UTC

[jira] [Updated] (YARN-5560) Clean up bad exception catching practices in TestYarnClient

     [ https://issues.apache.org/jira/browse/YARN-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Po updated YARN-5560:
--------------------------
    Description: 
In TestYarnClient, tests commonly wrap methods that throw exceptions in a try catch statement similar to the following:


{code}
try {
    client.submitApplication(context);
} catch (Exception e) {
    Assert.fail("Exception is not expected.");
}
{code}

This hides useful error messages, and surfaces less helpful ones.

  was:
In TestYarnClient, tests commonly wrap methods that throw exceptions in a try catch statement similar to the following:

{{try {}}
{{client.submitApplication(context);}}
{{} catch (Exception e) {}}
{{Assert.fail("Exception is not expected.");}}
{{}}}

This hides useful error messages, and surfaces less helpful ones.


> Clean up bad exception catching practices in TestYarnClient
> -----------------------------------------------------------
>
>                 Key: YARN-5560
>                 URL: https://issues.apache.org/jira/browse/YARN-5560
>             Project: Hadoop YARN
>          Issue Type: Test
>            Reporter: Sean Po
>            Assignee: Sean Po
>
> In TestYarnClient, tests commonly wrap methods that throw exceptions in a try catch statement similar to the following:
> {code}
> try {
>     client.submitApplication(context);
> } catch (Exception e) {
>     Assert.fail("Exception is not expected.");
> }
> {code}
> This hides useful error messages, and surfaces less helpful ones.



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

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