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-1560) TestYarnClient#testAMMRTokens fails with null AMRM token
Date Mon, 06 Jan 2014 05:52:51 GMT

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

Jian He commented on YARN-1560:
-------------------------------

{code}
while (rmClient.getAMRMToken(appId) == null) {
      if (System.currentTimeMillis() - start > 20 * 1000) {
          Assert.assertNotNull("AMRM token is null", null);
          Thread.sleep(100);
      }
}
{code}

- should Thread.sleep(100) be out of the if condition block ?
- Assert.assertNotNull("AMRM token is null", null); Instead, we can use Assert.fail("AMRM
token is null") ?
- there's one more place in the test case which needs to be handled as the same.
{code}
appId = createApp(rmClient, true);
waitTillAccepted(rmClient, appId);
//unmanaged AMs do return AMRM token
Assert.assertNotNull(rmClient.getAMRMToken(appId));
{code}

> TestYarnClient#testAMMRTokens fails with null AMRM token
> --------------------------------------------------------
>
>                 Key: YARN-1560
>                 URL: https://issues.apache.org/jira/browse/YARN-1560
>             Project: Hadoop YARN
>          Issue Type: Test
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>         Attachments: yarn-1560-v1.txt
>
>
> The following can be reproduced locally:
> {code}
> testAMMRTokens(org.apache.hadoop.yarn.client.api.impl.TestYarnClient)  Time elapsed:
3.341 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: null
>   at junit.framework.Assert.fail(Assert.java:48)
>   at junit.framework.Assert.assertTrue(Assert.java:20)
>   at junit.framework.Assert.assertNotNull(Assert.java:218)
>   at junit.framework.Assert.assertNotNull(Assert.java:211)
>   at org.apache.hadoop.yarn.client.api.impl.TestYarnClient.testAMMRTokens(TestYarnClient.java:382)
> {code}
> This test didn't appear in https://builds.apache.org/job/Hadoop-Yarn-trunk/442/consoleFull



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message