|
@@ -2160,6 +2160,20 @@ public class TestRMContainerAllocator {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
+ public void testIfApplicationPriorityIsNotSet() {
|
|
|
|
+ Job mockJob = mock(Job.class);
|
|
|
|
+ RMCommunicator communicator = mock(RMCommunicator.class);
|
|
|
|
+ ClientService service = mock(ClientService.class);
|
|
|
|
+ AppContext context = mock(AppContext.class);
|
|
|
|
+ AMPreemptionPolicy policy = mock(AMPreemptionPolicy.class);
|
|
|
|
+ when(communicator.getJob()).thenReturn(mockJob);
|
|
|
|
+ RMContainerAllocator allocator = new RMContainerAllocator(service, context,
|
|
|
|
+ policy);
|
|
|
|
+ AllocateResponse response = Records.newRecord(AllocateResponse.class);
|
|
|
|
+ allocator.handleJobPriorityChange(response);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Test
|
|
@Test
|
|
public void testReduceScheduling() throws Exception {
|
|
public void testReduceScheduling() throws Exception {
|
|
int totalMaps = 10;
|
|
int totalMaps = 10;
|