YARN-2400. Fixed TestAMRestart fails intermittently. Contributed by Jian He:

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1617028 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Xuan Gong 2014-08-09 23:31:11 +00:00
parent ee3825e278
commit 743f7f30da
2 changed files with 4 additions and 1 deletions

View File

@ -159,6 +159,8 @@ Release 2.6.0 - UNRELEASED
YARN-2008. Fixed CapacityScheduler to calculate headroom based on max available
capacity instead of configured max capacity. (Craig Welch via jianhe)
YARN-2400. Fixed TestAMRestart fails intermittently. (Jian He via xgong)
Release 2.5.0 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -386,7 +386,8 @@ public class TestAMRestart {
ApplicationState appState =
memStore.getState().getApplicationState().get(app1.getApplicationId());
// AM should be restarted even though max-am-attempt is 1.
MockAM am2 = MockRM.launchAndRegisterAM(app1, rm1, nm1);
MockAM am2 =
rm1.waitForNewAMToLaunchAndRegister(app1.getApplicationId(), 2, nm1);
RMAppAttempt attempt2 = app1.getCurrentAppAttempt();
Assert.assertTrue(((RMAppAttemptImpl) attempt2).mayBeLastAttempt());