YARN-5023. TestAMRestart#testShouldNotCountFailureToMaxAttemptRetry fails. Contributed by sandflee
This commit is contained in:
parent
4009fa3a92
commit
c35a5a7a8d
@ -937,6 +937,10 @@ private static void waitForSchedulerAppAttemptAdded(
|
|||||||
rm.getResourceScheduler()).getApplicationAttempt(attemptId));
|
rm.getResourceScheduler()).getApplicationAttempt(attemptId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE: nm.nodeHeartbeat is explicitly invoked,
|
||||||
|
* don't invoke it before calling launchAM
|
||||||
|
*/
|
||||||
public static MockAM launchAM(RMApp app, MockRM rm, MockNM nm)
|
public static MockAM launchAM(RMApp app, MockRM rm, MockNM nm)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
RMAppAttempt attempt = waitForAttemptScheduled(app, rm);
|
RMAppAttempt attempt = waitForAttemptScheduled(app, rm);
|
||||||
|
@ -208,8 +208,6 @@ public void testNMTokenSentForNormalContainer() throws Exception {
|
|||||||
CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler();
|
CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler();
|
||||||
cs.getApplicationAttempt(attempt.getAppAttemptId()).getNewContainerId();
|
cs.getApplicationAttempt(attempt.getAppAttemptId()).getNewContainerId();
|
||||||
|
|
||||||
// kick the scheduling
|
|
||||||
nm1.nodeHeartbeat(true);
|
|
||||||
MockAM am = MockRM.launchAM(app, rm, nm1);
|
MockAM am = MockRM.launchAM(app, rm, nm1);
|
||||||
// am container Id not equal to 1.
|
// am container Id not equal to 1.
|
||||||
Assert.assertTrue(
|
Assert.assertTrue(
|
||||||
|
@ -473,7 +473,6 @@ public void testShouldNotCountFailureToMaxAttemptRetry() throws Exception {
|
|||||||
appState.getAttempt(am4.getApplicationAttemptId())
|
appState.getAttempt(am4.getApplicationAttemptId())
|
||||||
.getAMContainerExitStatus());
|
.getAMContainerExitStatus());
|
||||||
// launch next AM in nm2
|
// launch next AM in nm2
|
||||||
nm2.nodeHeartbeat(true);
|
|
||||||
MockAM am5 =
|
MockAM am5 =
|
||||||
rm1.waitForNewAMToLaunchAndRegister(app1.getApplicationId(), 5, nm2);
|
rm1.waitForNewAMToLaunchAndRegister(app1.getApplicationId(), 5, nm2);
|
||||||
RMAppAttempt attempt5 = app1.getCurrentAppAttempt();
|
RMAppAttempt attempt5 = app1.getCurrentAppAttempt();
|
||||||
|
Loading…
Reference in New Issue
Block a user