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

Jason Lowe commented on YARN-8837:
----------------------------------

Thanks for the patch!  Wouldn't it be much simpler to have the patch catch 
SocketException directly rather than catch IOException with a check for not 
SocketException?  Then any other exception type will not be caught, so it will 
bubble up and fail the test with a corresponding exception message and 
stacktrace.


> TestNMProxy.testNMProxyRPCRetry Improvement
> -------------------------------------------
>
>                 Key: YARN-8837
>                 URL: https://issues.apache.org/jira/browse/YARN-8837
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: yarn
>    Affects Versions: 3.2.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Trivial
>         Attachments: YARN-8789.1.patch
>
>
> The unit test 
> {{org.apache.hadoop.yarn.server.nodemanager.containermanager.TestNMProxy.testNMProxyRetry()}}
>  has had some issues in the past. You can search JIRA for it, but one example 
> is [YARN-5104].  I recently had some issues with it myself and found the 
> follow change helpful in troubleshooting.
> {code:java|title=Current Implementation}
> } catch (IOException e) {
>     // socket exception should be thrown immediately, without RPC retries.
>     Assert.assertTrue(e instanceof java.net.SocketException);
> }
> {code}
> The issue here is that the test is true/false.  The testing framework does 
> not give me any feedback regarding the type of exception that was thrown, it 
> just says "assertion failed."



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to