Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/13163#discussion_r63972318 --- Diff: launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java --- @@ -59,6 +59,18 @@ public void testClusterCmdBuilder() throws Exception { } @Test + public void testCliHelpAndNoArg() throws Exception { + List<String> sparkSubmitArgs = Arrays.asList(parser.HELP); + Map<String, String> env = new HashMap<>(); + List<String> cmd = buildCommand(sparkSubmitArgs, env); + assertTrue("--help should be contained in the final cmd.", cmd.contains(parser.HELP)); + + List<String> sparkEmptyArgs = Arrays.asList(""); + cmd = buildCommand(sparkSubmitArgs, env); --- End diff -- This is still wrong; you're not testing `sparkEmptyArgs` at all! If you break this into two different tests, you'll see what I mean, because `sparkSubmitArgs` won't be defined when you're supposed to be testing the empty args list. (If that makes it clearer, call the first list `helpArgs` instead of `sparkSubmitArgs`; then it will be easier to see that you're using the wrong list in this call.)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org