YARN-8541 (branch-3.1 addendum): RM startup failure on recovery after user deletion
This commit is contained in:
parent
aee8fb567b
commit
80735a15a5
|
@ -83,16 +83,11 @@ public class TestPlacementManager {
|
||||||
|
|
||||||
ApplicationSubmissionContext asc = Records.newRecord(
|
ApplicationSubmissionContext asc = Records.newRecord(
|
||||||
ApplicationSubmissionContext.class);
|
ApplicationSubmissionContext.class);
|
||||||
|
asc.setQueue(YarnConfiguration.DEFAULT_QUEUE_NAME);
|
||||||
asc.setApplicationName(APP_NAME);
|
asc.setApplicationName(APP_NAME);
|
||||||
|
|
||||||
boolean caughtException = false;
|
Assert.assertNull("Placement should be null",
|
||||||
try{
|
pm.placeApplication(asc, USER2));
|
||||||
pm.placeApplication(asc, USER2);
|
|
||||||
} catch (Exception e) {
|
|
||||||
caughtException = true;
|
|
||||||
}
|
|
||||||
Assert.assertTrue(caughtException);
|
|
||||||
|
|
||||||
QueueMappingEntity queueMappingEntity = new QueueMappingEntity(APP_NAME,
|
QueueMappingEntity queueMappingEntity = new QueueMappingEntity(APP_NAME,
|
||||||
USER1, PARENT_QUEUE);
|
USER1, PARENT_QUEUE);
|
||||||
|
|
||||||
|
@ -100,12 +95,13 @@ public class TestPlacementManager {
|
||||||
Arrays.asList(queueMappingEntity));
|
Arrays.asList(queueMappingEntity));
|
||||||
queuePlacementRules.add(anRule);
|
queuePlacementRules.add(anRule);
|
||||||
pm.updateRules(queuePlacementRules);
|
pm.updateRules(queuePlacementRules);
|
||||||
try{
|
try {
|
||||||
pm.placeApplication(asc, USER2);
|
ApplicationPlacementContext pc = pm.placeApplication(asc, USER2);
|
||||||
|
Assert.assertNotNull(pc);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
caughtException = false;
|
e.printStackTrace();
|
||||||
|
Assert.fail("Exception not expected");
|
||||||
}
|
}
|
||||||
Assert.assertFalse(caughtException);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue