YARN-10327. Remove duplication of checking for invalid application ID in TestLogsCLI. Contributed by Marton Hudaky

This commit is contained in:
Szilard Nemeth 2020-06-26 13:21:55 +02:00
parent 6459cc73e6
commit e0c1d8a969
1 changed files with 0 additions and 13 deletions

View File

@ -167,19 +167,6 @@ public class TestLogsCLI {
"options parsing failed: Unrecognized option: -InvalidOpts")); "options parsing failed: Unrecognized option: -InvalidOpts"));
} }
@Test(timeout = 5000l)
public void testInvalidApplicationId() throws Exception {
YarnClient mockYarnClient = createMockYarnClient(
YarnApplicationState.FINISHED,
UserGroupInformation.getCurrentUser().getShortUserName());
LogsCLI cli = new LogsCLIForTest(mockYarnClient);
cli.setConf(conf);
int exitCode = cli.run( new String[] { "-applicationId", "not_an_app_id"});
assertTrue(exitCode == -1);
assertTrue(sysErrStream.toString().startsWith("Invalid ApplicationId specified"));
}
@Test(timeout = 5000L) @Test(timeout = 5000L)
public void testInvalidAMContainerId() throws Exception { public void testInvalidAMContainerId() throws Exception {
conf.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED, true); conf.setBoolean(YarnConfiguration.APPLICATION_HISTORY_ENABLED, true);