@Override protected Queue getDefaultQueue() { return getReservationQueue("dedicated" + ReservationConstants.DEFAULT_QUEUE_SUFFIX); }
@Test public void testWithKillOnExpiry() throws PlanningException, InterruptedException, AccessControlException { // invoke plan follower test with kill testPlanFollower(false); }
@Before public void setUp() throws Exception { conf = createConfiguration(); ReservationSystemTestUtil.setupFSAllocationFile(ALLOC_FILE); // Setup rmContext = TestUtils.getMockRMContext(); spyRMContext = spy(rmContext); fs = ReservationSystemTestUtil.setupFairScheduler(spyRMContext, conf, 125); scheduler = fs; ConcurrentMap<ApplicationId, RMApp> spyApps = spy(new ConcurrentHashMap<ApplicationId, RMApp>()); RMApp rmApp = mock(RMApp.class); when(rmApp.getRMAppAttempt((ApplicationAttemptId) Matchers.any())) .thenReturn(null); Mockito.doReturn(rmApp).when(spyApps).get((ApplicationId) Matchers.any()); when(spyRMContext.getRMApps()).thenReturn(spyApps); ReservationSystemTestUtil.setupFSAllocationFile(ALLOC_FILE); setupPlanFollower(); }
@Override protected void checkDefaultQueueBeforePlanFollowerRun() { Assert.assertNull(getDefaultQueue()); } @Override
@Before public void setUp() throws Exception { conf = createConfiguration(); ReservationSystemTestUtil.setupFSAllocationFile(ALLOC_FILE); ReservationSystemTestUtil testUtil = new ReservationSystemTestUtil(); // Setup rmContext = TestUtils.getMockRMContext(); spyRMContext = spy(rmContext); fs = ReservationSystemTestUtil.setupFairScheduler(testUtil, spyRMContext, conf, 125); scheduler = fs; ConcurrentMap<ApplicationId, RMApp> spyApps = spy(new ConcurrentHashMap<ApplicationId, RMApp>()); RMApp rmApp = mock(RMApp.class); when(rmApp.getRMAppAttempt((ApplicationAttemptId) Matchers.any())) .thenReturn(null); Mockito.doReturn(rmApp).when(spyApps).get((ApplicationId) Matchers.any()); when(spyRMContext.getRMApps()).thenReturn(spyApps); ReservationSystemTestUtil.setupFSAllocationFile(ALLOC_FILE); setupPlanFollower(); }
@Override protected Queue getDefaultQueue() { return getReservationQueue("dedicated" + ReservationConstants.DEFAULT_QUEUE_SUFFIX); }
@Test public void testWithMoveOnExpiry() throws PlanningException, InterruptedException, AccessControlException { // invoke plan follower test with move testPlanFollower(true); }
@Override protected void assertReservationQueueDoesNotExist(ReservationId r) { Queue q = getReservationQueue(r.toString()); assertNull(q); }
@Test public void testWithMoveOnExpiry() throws PlanningException, InterruptedException, AccessControlException { // invoke plan follower test with move testPlanFollower(true); }
@Override protected void assertReservationQueueDoesNotExist(ReservationId r) { Queue q = getReservationQueue(r.toString()); assertNull(q); }
@Test public void testWithKillOnExpiry() throws PlanningException, InterruptedException, AccessControlException { // invoke plan follower test with kill testPlanFollower(false); }
@Override protected void assertReservationQueueExists(ReservationId r) { Queue q = getReservationQueue(r.toString()); assertNotNull(q); }
@Override protected void assertReservationQueueExists(ReservationId r) { Queue q = getReservationQueue(r.toString()); assertNotNull(q); }