[ 
https://issues.apache.org/jira/browse/YARN-10327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144914#comment-17144914
 ] 

Hudáky Márton Gyula edited comment on YARN-10327 at 6/25/20, 1:43 PM:
----------------------------------------------------------------------

TestLogsCLI#testInvalidApplicationId was removed and  the test case for 
checking invalid application ID in TestLogsCLI#testLogsCLIWithInvalidArgs is 
kept.


was (Author: mhudaky):
{{The removed test case looks like this:}}

 
 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"));
  

There is another test case in testLogsCLIWithInvalidArgs() testing the same 
failure:

 
 YarnClient mockYarnClient =
 createMockYarnClient(YarnApplicationState.FINISHED,
 UserGroupInformation.getCurrentUser().getShortUserName());
 LogsCLI cli = new LogsCLIForTest(mockYarnClient);
 cli.setConf(conf);// Specify an invalid applicationId
 int exitCode = cli.run(new String[]

{"-applicationId", "123"}

);
 assertTrue(exitCode == -1);
 assertTrue(sysErrStream.toString().contains(
 "Invalid ApplicationId specified"));
  

> Remove duplication of checking for invalid application ID in TestLogsCLI
> ------------------------------------------------------------------------
>
>                 Key: YARN-10327
>                 URL: https://issues.apache.org/jira/browse/YARN-10327
>             Project: Hadoop YARN
>          Issue Type: Test
>            Reporter: Hudáky Márton Gyula
>            Assignee: Hudáky Márton Gyula
>            Priority: Trivial
>         Attachments: YARN-10327.001.patch
>
>
> TestLogsCLI has a separate function to test for invalid application ID 
> (#testInvalidApplicationId) and another (#testLogsCLIWithInvalidArgs) to test 
> multiple invalid arguments (including application ID). One of them should be 
> eliminated.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to