YARN-5023. TestAMRestart#testShouldNotCountFailureToMaxAttemptRetry fails. Contributed by sandflee
(cherry picked from commit c35a5a7a8d
)
This commit is contained in:
parent
1458e66593
commit
d2559ca307
|
@ -937,6 +937,10 @@ public class MockRM extends ResourceManager {
|
|||
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)
|
||||
throws Exception {
|
||||
RMAppAttempt attempt = waitForAttemptScheduled(app, rm);
|
||||
|
|
|
@ -208,8 +208,6 @@ public class TestRM extends ParameterizedSchedulerTestBase {
|
|||
CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler();
|
||||
cs.getApplicationAttempt(attempt.getAppAttemptId()).getNewContainerId();
|
||||
|
||||
// kick the scheduling
|
||||
nm1.nodeHeartbeat(true);
|
||||
MockAM am = MockRM.launchAM(app, rm, nm1);
|
||||
// am container Id not equal to 1.
|
||||
Assert.assertTrue(
|
||||
|
|
|
@ -473,7 +473,6 @@ public class TestAMRestart {
|
|||
appState.getAttempt(am4.getApplicationAttemptId())
|
||||
.getAMContainerExitStatus());
|
||||
// launch next AM in nm2
|
||||
nm2.nodeHeartbeat(true);
|
||||
MockAM am5 =
|
||||
rm1.waitForNewAMToLaunchAndRegister(app1.getApplicationId(), 5, nm2);
|
||||
RMAppAttempt attempt5 = app1.getCurrentAppAttempt();
|
||||
|
|
Loading…
Reference in New Issue