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 "Yufei Gu (JIRA)" <ji...@apache.org> on 2017/03/16 17:18:42 UTC

[jira] [Updated] (YARN-6334) TestRMFailover#testAutomaticFailover always passes even when it should fail

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

Yufei Gu updated YARN-6334:
---------------------------
    Summary: TestRMFailover#testAutomaticFailover always passes even when it should fail  (was: TestRMFailover#testAutomaticFailover always passes even RM didn't transition to Standby.)

> TestRMFailover#testAutomaticFailover always passes even when it should fail
> ---------------------------------------------------------------------------
>
>                 Key: YARN-6334
>                 URL: https://issues.apache.org/jira/browse/YARN-6334
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Yufei Gu
>            Assignee: Yufei Gu
>         Attachments: YARN-6334.001.patch, YARN-6334.002.patch, YARN-6334.003.patch, YARN-6334.004.patch
>
>
> Due to a bug in {{while}} loop. 
> {code}
>     int maxWaitingAttempts = 2000;
>     while (maxWaitingAttempts-- > 0 ) {
>       if (rm.getRMContext().getHAServiceState() == HAServiceState.STANDBY) {
>         break;
>       }
>       Thread.sleep(1);
>     }
>     Assert.assertFalse("RM didn't transition to Standby ",
>         maxWaitingAttempts == 0);
> {code}
> maxWaitingAttempts is -1 if RM didn't transition to Standby. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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