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