YARN-7385. TestFairScheduler#testUpdateDemand and TestFSLeafQueue#testUpdateDemand are failing with NPE (yufeigu via rkanter)
This commit is contained in:
parent
1c5c2b5dde
commit
03af442e76
@ -88,6 +88,7 @@ public void testUpdateDemand() {
|
|||||||
|
|
||||||
FSAppAttempt app = mock(FSAppAttempt.class);
|
FSAppAttempt app = mock(FSAppAttempt.class);
|
||||||
Mockito.when(app.getDemand()).thenReturn(maxResource);
|
Mockito.when(app.getDemand()).thenReturn(maxResource);
|
||||||
|
Mockito.when(app.getResourceUsage()).thenReturn(Resources.none());
|
||||||
|
|
||||||
schedulable.addApp(app, true);
|
schedulable.addApp(app, true);
|
||||||
schedulable.addApp(app, true);
|
schedulable.addApp(app, true);
|
||||||
|
@ -5252,8 +5252,10 @@ public void testUpdateDemand() throws IOException {
|
|||||||
|
|
||||||
FSAppAttempt app1 = mock(FSAppAttempt.class);
|
FSAppAttempt app1 = mock(FSAppAttempt.class);
|
||||||
Mockito.when(app1.getDemand()).thenReturn(maxResource);
|
Mockito.when(app1.getDemand()).thenReturn(maxResource);
|
||||||
|
Mockito.when(app1.getResourceUsage()).thenReturn(Resources.none());
|
||||||
FSAppAttempt app2 = mock(FSAppAttempt.class);
|
FSAppAttempt app2 = mock(FSAppAttempt.class);
|
||||||
Mockito.when(app2.getDemand()).thenReturn(maxResource);
|
Mockito.when(app2.getDemand()).thenReturn(maxResource);
|
||||||
|
Mockito.when(app2.getResourceUsage()).thenReturn(Resources.none());
|
||||||
|
|
||||||
QueueManager queueManager = scheduler.getQueueManager();
|
QueueManager queueManager = scheduler.getQueueManager();
|
||||||
FSParentQueue queue1 = queueManager.getParentQueue("queue1", true);
|
FSParentQueue queue1 = queueManager.getParentQueue("queue1", true);
|
||||||
|
Loading…
Reference in New Issue
Block a user