YARN-2649. Fixed TestAMRMRPCNodeUpdates test failure. Contributed by Ming Ma

This commit is contained in:
Jian He 2014-10-08 10:58:51 -07:00
parent 1efd9c9825
commit e16e25ab1b
2 changed files with 11 additions and 1 deletions

View File

@ -588,6 +588,8 @@ Release 2.6.0 - UNRELEASED
YARN-1857. CapacityScheduler headroom doesn't account for other AM's running.
(Chen He and Craig Welch via jianhe)
YARN-2649. Fixed TestAMRMRPCNodeUpdates test failure. (Ming Ma via jianhe)
Release 2.5.1 - 2014-09-05
INCOMPATIBLE CHANGES

View File

@ -386,7 +386,15 @@ PrivilegedAction<SubmitApplicationResponse> setClientReq(
if (waitForAccepted) {
waitForState(appId, RMAppState.ACCEPTED);
}
return getRMContext().getRMApps().get(appId);
RMApp rmApp = getRMContext().getRMApps().get(appId);
// unmanaged AM won't go to RMAppAttemptState.SCHEDULED.
if (waitForAccepted && !unmanaged) {
waitForState(rmApp.getCurrentAppAttempt().getAppAttemptId(),
RMAppAttemptState.SCHEDULED);
}
return rmApp;
}
public MockNM registerNode(String nodeIdStr, int memory) throws Exception {