YARN-9453. Clean up code long if-else chain in ApplicationCLI#run. Contributed by Wanqiang Ji.

This commit is contained in:
Giovanni Matteo Fumarola 2019-05-13 11:11:20 -07:00
parent 29ff7fb140
commit 206e633946
2 changed files with 734 additions and 601 deletions

View File

@ -2027,9 +2027,8 @@ public void testUpdateApplicationPriority() throws Exception {
@Test
public void testFailApplicationAttempt() throws Exception {
ApplicationCLI cli = createAndGetAppCLI();
int exitCode =
cli.run(new String[] { "applicationattempt", "-fail",
"appattempt_1444199730803_0003_000001" });
int exitCode = cli.run(new String[] {"applicationattempt", "-fail",
"appattempt_1444199730803_0003_000001"});
Assert.assertEquals(0, exitCode);
verify(client).failApplicationAttempt(any(ApplicationAttemptId.class));