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

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1617029 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Xuan Gong 2014-08-09 23:32:08 +00:00
parent af83e57e82
commit 775c42d3ea
2 changed files with 4 additions and 1 deletions

View File

@ -141,6 +141,8 @@ Release 2.6.0 - UNRELEASED
YARN-2008. Fixed CapacityScheduler to calculate headroom based on max available YARN-2008. Fixed CapacityScheduler to calculate headroom based on max available
capacity instead of configured max capacity. (Craig Welch via jianhe) 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 Release 2.5.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -386,7 +386,8 @@ public class TestAMRestart {
ApplicationState appState = ApplicationState appState =
memStore.getState().getApplicationState().get(app1.getApplicationId()); memStore.getState().getApplicationState().get(app1.getApplicationId());
// AM should be restarted even though max-am-attempt is 1. // 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(); RMAppAttempt attempt2 = app1.getCurrentAppAttempt();
Assert.assertTrue(((RMAppAttemptImpl) attempt2).mayBeLastAttempt()); Assert.assertTrue(((RMAppAttemptImpl) attempt2).mayBeLastAttempt());