@Test public void testAppRunningKill() throws IOException { LOG.info("--- START: testAppRunningKill ---"); UserGroupInformation fooUser = UserGroupInformation.createUserForTesting( "fooTestAppRunningKill", new String[] { "foo_group" }); RMApp application = testCreateAppRunning(null); // RUNNING => KILLED event RMAppEventType.KILL RMAppEvent event = new RMAppKillByClientEvent( application.getApplicationId(), "Application killed by user.", fooUser, Server.getRemoteIp()); application.handle(event); rmDispatcher.await(); sendAttemptUpdateSavedEvent(application); sendAppUpdateSavedEvent(application); assertKilled(application); verifyApplicationFinished(RMAppState.KILLED); verifyAppRemovedSchedulerEvent(RMAppState.KILLED); }
@Test public void testAppRunningKill() throws IOException { LOG.info("--- START: testAppRunningKill ---"); RMApp application = testCreateAppRunning(null); // RUNNING => KILLED event RMAppEventType.KILL UserGroupInformation fooUser = UserGroupInformation.createUserForTesting( "fooTestAppRunningKill", new String[] {"foo_group"}); // SUBMITTED => KILLED event RMAppEventType.KILL RMAppEvent event = new RMAppKillByClientEvent( application.getApplicationId(), "Application killed by user.", fooUser, Server.getRemoteIp()); application.handle(event); rmDispatcher.await(); sendAttemptUpdateSavedEvent(application); sendAppUpdateSavedEvent(application); assertKilled(application); verifyApplicationFinished(RMAppState.KILLED); verifyAppRemovedSchedulerEvent(RMAppState.KILLED); verifyRMAppFieldsForFinalTransitions(application); }
application.handle(event); rmDispatcher.await(); sendAttemptUpdateSavedEvent(application); sendAppUpdateSavedEvent(application); assertTimesAtFinish(application);
sendAttemptUpdateSavedEvent(application); sendAppUpdateSavedEvent(application); assertTimesAtFinish(application);