[ https://issues.apache.org/jira/browse/YARN-6334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15927002#comment-15927002 ]
Yufei Gu commented on YARN-6334: -------------------------------- No, we don't hit the bug a lot. Flakiness is possible because of sleeping too short. Tested more than 50 times, no related failures. But I agree with you that 2000 * 1 = 2000 ms waiting time may be too short. I will increase it to 20s in next patch. > TestRMFailover#testAutomaticFailover always passes even RM didn't transition > to Standby. > ---------------------------------------------------------------------------------------- > > 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 > > > 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org